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<bits/stdc++.h>
#include "cave.h"
using namespace std;
void exploreCave(int n) {
vector<int> door_of(n, -1);
for (int i = 0; i < n; i++) {
int l = -1, r = n-1;
while (l < r-1) {
int mid = (l + r) / 2;
vector<int> comb(n);
for (int i = 0; i < n;i++) {
comb[i] = door_of[i] == -1 && i <= mid;
}
if (tryCombination(comb.data()) == i) {
r = mid;
} else l = mid;
}
door_of[r] = i;
}
vector<int> zeros(n);
answer(zeros.data(),door_of.data());
}
# | 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... |