# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
341512 | 2020-12-29T21:49:34 Z | FlashGamezzz | Werewolf (IOI18_werewolf) | C++11 | 177 ms | 21356 KB |
#include <iostream> #include <cstdlib> #include <cstdio> #include <fstream> #include <algorithm> #include <unordered_set> #include <vector> #include <utility> #include "werewolf.h" using namespace std; // bool r1[3000], r2[3000]; /*void dfs1(int i, int l, bool r1[]){ if (i >= l){ r1[i] = true; for (int a : adj[i]){ if (a >= l && !r1[a]){ dfs1(a, l); } } } } void dfs2(int i, int r, bool r2[]){ if (i <= r){ r1[i] = true; for (int a : adj[i]){ if (a <= r && !r2[a]){ dfs2(a, r); } } } }*/ vector<int> check_validity(int N, vector<int> X, vector<int> Y, vector<int> S, vector<int> E, vector<int> L, vector<int> R) { int Q = S.size(); vector<int> A(Q); for (int i = 0; i < Q; ++i) { A[i] = 0; } vector<int> adj[3000]; for (int i = 0; i < X.size(); i++){ adj[X[i]].push_back(Y[i]); adj[Y[i]].push_back(X[i]); } /*for (int i = 0; i < Q; i++) { for (int j = 0; j < N; j++){ r1[j] = false; r2[j] = false; } dfs1(S[i], L[i]); dfs2(E[i], R[i]); for (int j = L[i]; j <= R[i]; j++){ if (r1[j] && r2[j]){ A[i] = 1; break; } } }*/ return A; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 177 ms | 21356 KB | Execution killed with signal 7 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |