# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
285448 | Bill_00 | Cave (IOI13_cave) | C++14 | 78 ms | 480 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"
int p[10000]={0},a[10000],up[10000];
void dfs(int l,int r,int L,int R,int id,int now){
for(int i=L;i<=R;i++){
if(p[i]!=0) continue;
a[i]+=1;
a[i]%=2;
}
int k=tryCombination(a);
if(L==R && k!=id && now==0){
p[L+1]=id;
up[L+1]=a[L+1];
return;
}
if(L==R && k==id && now==0){
p[L]=id;
up[L]=(a[L]+1)%2;
return;
}
if(L==R && k!=id && now==1){
p[L]=id;
up[L]=a[L];
return;
}
if(L==R && k==id && now==1){
p[L+1]=id;
up[L+1]=(a[L+1]+1)%2;
return;
}
if(k!=id && now==1){
# | 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... |