This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cave.h"
const int MAXN = 5000;
int S[MAXN], B[MAXN], D[MAXN];
void exploreCave(int N) {
for(int i = 0; i < N; ++i) S[i] = 0;
int door = tryCombination(S);
while(door >= 0) {
for(int j = 0; j < N && door >= 0; ++j) {
S[j] ^= 1;
int ans = tryCombination(S);
if(ans > door || ans < 0) S[j] ^= 1;
door = ans;
S[j] ^= 1;
}
}
for(int i = 0; i < N; ++i) B[i] = S[i] ^ 1;
for(int i = 0; i < N; ++i) {
S[i] ^= 1;
D[i] = tryCombination(S);
S[i] ^= 1;
}
answer(B, D);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |