# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
76366 | 2018-09-13T07:16:37 Z | Sherazin | Cave (IOI13_cave) | C++14 | 65 ms | 512 KB |
#include "cave.h" #include <bits/stdc++.h> using namespace std; const int N = 5e3+5; int n; bitset<N> chk; int S[N], D[N]; void exploreCave(int _n) { n = _n; int t; for(int i = 0; i < n; i++) { t = tryCombination(S); bool s = (t == -1 || t > i); int l = 0, r = n-1; while(l < r) { int m = (l+r) >> 1; for(int j = l; j <= r; j++) if(!chk[j]) S[j] ^= 1; int a = tryCombination(S), e = (a == -1 || a > i); if(t ^ a) r = m; else l = m+1; } if(t == i) S[l] ^= 1; chk[l] = 1; D[l] = i; } answer(S, D); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 64 ms | 476 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 65 ms | 512 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 384 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 384 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 64 ms | 476 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |