| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 777123 | welleyth | 늑대인간 (IOI18_werewolf) | C++17 | 4075 ms | 29852 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
constexpr int N = (int)2e5+11;
vector<int> g[N];
vector<int> check_validity(int N,vector<int> X,vector<int> Y,vector<int> S,vector<int> E,vector<int> L,vector<int> R){
for(int i = 0; i < X.size(); i++){
g[X[i]].push_back(Y[i]);
g[Y[i]].push_back(X[i]);
}
int q = S.size();
int n = N;
bool can[2][n+1];
vector<int> ans;
for(int i = 0; i < q; i++){
memset(can,0,sizeof can);
queue<int> q;
q.push(S[i]);
can[0][S[i]] = 1;
while(!q.empty()){
int v = q.front();
q.pop();
for(auto& to : g[v]){
if(!can[0][to] && to >= L[i]){
can[0][to] = 1;
q.push(to);
}
}
}
q.push(E[i]);
can[1][E[i]] = 1;
while(!q.empty()){
int v = q.front();
q.pop();
for(auto& to : g[v]){
if(!can[1][to] && to <= R[i]){
can[1][to] = 1;
q.push(to);
}
}
}
bool ok = false;
for(int j = L[i]; j <= R[i]; j++)
ok |= can[0][j] && can[1][j];
ans.push_back(ok);
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
