# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
733310 | Mauve | Cave (IOI13_cave) | C++14 | 97 ms | 468 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;
bool known[N];
for(int i=0;i<=N;i++){
a[i]=0;
known[i]=false;
}
while(true){
k=tryCombination(a);
if(k==-1) break;
for(i=0;i<N;i++)
if(!known[i]){
a[i]=1;
r=tryCombination(a);
if(r==-1) break;
if(r<k){
pos[i]=r;
a[i]=0;
known[i]=1;
}
if(r>k){
pos[i]=k;
a[i]=1;
known[i]=1;
}
if(r==k) a[i]=0;
}
}
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... |