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"
#include <bits/stdc++.h>
using namespace std;
const int maxN = 5e3 + 20;
int S[maxN];
int D[maxN];
bool flag[maxN];
void exploreCave(int N) {
for (int i = 0; i < N; i++) {
D[i] = -1;
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
if (!flag[j]) {
S[j] = 0;
}
}
int state = (tryCombination(S) == i);
int id = 0;
for (int k = 0; k < 13; k++) {
for (int j = 0; j < N; j++) {
if (!flag[j]) {
S[j] = state ^ ((j >> k) & 1);
}
}
id |= (tryCombination(S) == i) << k;
}
S[id] = state;
D[id] = i;
flag[id] = 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... |