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"
void exploreCave(int N) {
/* ... */
int Key[N];
bool isSuccess[N];
for (int i = 0; i < N; i++) {
Key[i] = 0;
isSuccess[i] = 0;
}
int ansS[N], ansD[N];
for (int i = 0; i < N; i++) {
int value = tryCombination(Key);
if (value > i) {
for (int j = 0; j < N; j++) {
if (!isSuccess[j]) {
Key[j] = Key[j] ^ 1;
}
}
}
for (int j = 0; j < N; j++) {
Key[j] = Key[j] ^ 1;
if (tryCombination(Key) > i) {
ansD[j] = i;
ansS[j] = Key[j];
break;
}
Key[j] = Key[j] ^ 1;
}
}
answer(ansS, ansD);
}
# | 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... |