# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
933254 | 2024-02-25T10:15:49 Z | SmuggingSpun | Cave (IOI13_cave) | C++14 | 75 ms | 492 KB |
#include "cave.h" #include<bits/stdc++.h> using namespace std; const int lim = 5e3 + 5; int S[lim], D[lim]; bitset<lim>vis; void exploreCave(int n){ vis.reset(); for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(!vis.test(j)){ S[j] = 0; } } if(tryCombination(S) != i){ for(int j = 0; j < n; j++){ if(!vis.test(j)){ S[j] = 1; } } } int low = 0, high = n - 1, ans; while(low <= high){ int mid = (low + high) >> 1; for(int j = mid + 1; j < n; j++){ if(!vis.test(j)){ S[j] ^= 1; } } if(tryCombination(S) == i){ high = (ans = mid) - 1; } else{ low = mid + 1; } for(int j = mid + 1; j < n; j++){ if(!vis.test(j)){ S[j] ^= 1; } } } D[ans] = i; vis.set(ans); } answer(S, D); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 52 ms | 492 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 75 ms | 344 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 52 ms | 492 KB | Answer is wrong |
2 | Halted | 0 ms | 0 KB | - |