# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
168128 |
2019-12-11T13:12:35 Z |
RoundMango |
Cave (IOI13_cave) |
C++14 |
|
86 ms |
516 KB |
#include <bits/stdc++.h>
#include "cave.h"
using namespace std;
int n, door[1000000], sw[100000], l , r, mid, ans[100000], first, second;
void exploreCave(int n) {
for (int x = 0; x < n; x++) {
first = tryCombination(door);
l = 0, r = n-1;
while (l != r) {
mid = (l+r)/2;
for (int i = l; i <= r; i++) if (!ans[i]) door[i] ^= 1;
second = tryCombination(door);
for (int i = l; i <= r; i++) if (!ans[i]) door[i] ^= 1;
if (first == second) l = mid+1;
else r = mid;
}
ans[l]++;
sw[l] = x;
if (first <= x || first != -1) door[l] = 1;
}
answer(sw, door);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
58 ms |
516 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
86 ms |
516 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
512 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
512 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
58 ms |
516 KB |
Answer is wrong |
2 |
Halted |
0 ms |
0 KB |
- |