# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17650 | Namnamseo | Cave (IOI13_cave) | C++14 | 493 ms | 644 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"
#include <cstdio>
int trial_array [5010];
bool fixed_point [5010];
int switch_forward [5010]; // index is for switch
int switch_reverse [5010]; // index is for door
int switch_parity [5010]; // index is for switch; value makes it open.
int n;
// zero is for open, one means closed.
int try_wrapper(){
int tmp = tryCombination(trial_array);
if(tmp<0) tmp=2*n;
return tmp;
}
void find_switch(int l,int r,int target,int zero_result){
if(l==r){
//printf("Found door %d : switch %d\n",target,l);
switch_reverse[target]=l;
switch_forward[l]=target;
switch_parity [l]=1-zero_result;
fixed_point [l]=1;
} else {
int m=(l+r)/2;
# | 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... |