| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 380668 | ritul_kr_singh | Cave (IOI13_cave) | C++17 | 324 ms | 492 KiB |
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 ans[N], curr[N], D[N];
for(int &i : ans) i = 2;
for(int i=0; i<N; ++i){
for(int j=0; j<N; ++j)
curr[i] = ans[i]<2 ? ans[i] : 1;
int currRes = tryCombination(curr);
bool one = currRes>i or currRes<0;
int low = 0, high = N-1;
while(low<high){
int mid = (low+high)/2;
for(int j=0; j<N; ++j)
curr[i] = ans[i]<2 ? ans[i] : ((int)(j<=mid)+(int)!one)%2;
currRes = tryCombination(curr);
if(currRes>i or currRes<0) high = mid;
else low = mid+1;
}
ans[low] = one;
D[low] = i;
}
answer(ans, D);
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
