# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
733312 | Mauve | Cave (IOI13_cave) | C++14 | 37 ms | 392 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<bits/stdc++.h>
using namespace std;
void exploreCave(int N) {
int pos[N],a[N],i,j,k,l,r;
for(int i=0;i<=N;i++){
a[i]=0;
}
while(true){
k=tryCombination(a);
if(k==-1) break;
for(i=0;i<N;i++){
a[i]=1-a[i];
j=tryCombination(a);
if(j==-1) break;
if(j<=k) a[i]=1-a[i];
else break;
}
}
for(i=0;i<N;i++){
a[i]=1-a[i];
pos[i]=tryCombination(a);
a[i]=1-a[i];
}
answer(a,pos);
}
Compilation message (stderr)
# | 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... |