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>
void exploreCave(int n) {
int sure[n] = {}, correct[n] = {}, index[n] = {};
for (int i = 0; i < n; i++) {
int l = 0, r = n-1;
while (l < r) {
const int mid = (l+r)/2;
int cpy[n];
for (int i = 0; i < n; i++)
cpy[i] = correct[i];
for (int i = mid+1; i < n; i++)
if (!sure[i])
cpy[i] = 1;
if (tryCombination(cpy) == i)
l = mid+1;
else
r = mid;
}
index[l] = i;
sure[l] = 1;
}
answer(correct, index);
}
# | 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... |