# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1045486 | 2024-08-06T03:08:30 Z | SiliconSquared | 늑대인간 (IOI18_werewolf) | C++17 | 4000 ms | 33740 KB |
#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; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 416 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 416 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 79 ms | 904 KB | Output is correct |
11 | Correct | 37 ms | 856 KB | Output is correct |
12 | Correct | 10 ms | 860 KB | Output is correct |
13 | Correct | 75 ms | 860 KB | Output is correct |
14 | Correct | 47 ms | 856 KB | Output is correct |
15 | Correct | 118 ms | 856 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 4014 ms | 33740 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 604 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 416 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 79 ms | 904 KB | Output is correct |
11 | Correct | 37 ms | 856 KB | Output is correct |
12 | Correct | 10 ms | 860 KB | Output is correct |
13 | Correct | 75 ms | 860 KB | Output is correct |
14 | Correct | 47 ms | 856 KB | Output is correct |
15 | Correct | 118 ms | 856 KB | Output is correct |
16 | Execution timed out | 4014 ms | 33740 KB | Time limit exceeded |
17 | Halted | 0 ms | 0 KB | - |