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;
void exploreCave(int n) {
int s[n] = {}, d[n] = {};
int used [n] = {};
for (int i = 0; i < n; i++) {
s[i] = 0;
}
for (int door = 0; door < n; door++){
for (int sw = 0; sw < n; sw++){
if (used[sw]) continue;
int k = tryCombination(s);
if (k == door) {
used[sw] = 1;
s[sw] = !s[sw];
d[sw] = door;
}
s[sw] = !s[sw];
k = tryCombination(s);
if (k == door) {
used[sw] = 1;
s[sw] = !s[sw];
d[sw] = door;
}
}
}
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... |