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 <iostream>
#include <vector>
#include "cave.h"
using namespace std;
void exploreCave(int N) {
int S[N];
int D[N];
vector <bool> done(N, false);
for (int d = 0; d < N; d++) {
for (int i = 0; i < N; i++) if (!done[i]) S[i] = 0;
int o = (tryCombination(S) != d ? 0 : 1), s = 0;
for (int j = 0; j < 13; j++) {
for (int i = 0; i < N; i++) if (!done[i]) S[i] = (i & (1 << j) ? o : 1 - o);
if (tryCombination(S) != d) s += (1 << j);
}
S[s] = o;
D[s] = d;
done[s] = true;
}
answer(S, 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... |