| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1045486 | SiliconSquared | 늑대인간 (IOI18_werewolf) | C++17 | 4014 ms | 33740 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
using namespace std;
#include <vector>
struct node{
int x;
vector<int> v;
bool g,h;
node(){}
};
vector<node> v;
std::vector<int> check_validity(int n, std::vector<int> X, std::vector<int> Y,
std::vector<int> S, std::vector<int> E,
std::vector<int> L, std::vector<int> R) {
v.resize(n);
for (int i=0;i<X.size();i++){
v[X[i]].v.push_back(Y[i]);
v[Y[i]].v.push_back(X[i]);
}
vector<int> q;
vector<int> z;
z.resize(S.size());
int p;
bool f;
for (int _=0;_<S.size();_++){
for (int i=0;i<n;i++){v[i].g=false;v[i].h=false;}
q.clear();
q.push_back(S[_]);
f=false;
while (!q.empty()){
p=q[q.size()-1];
q.pop_back();
if (v[p].g||p<L[_]){continue;}
v[p].g=true;
for (int i:v[p].v){
q.push_back(i);
}
}
q.clear();
q.push_back(E[_]);
while (!q.empty()){
p=q[q.size()-1];
q.pop_back();
if (v[p].h||p>R[_]){continue;}
if (v[p].g){f=true;break;}
v[p].h=true;
for (int i:v[p].v){
q.push_back(i);
}
}
z[_]=f;
}
return z;
}
컴파일 시 표준 에러 (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... | ||||
