Submission #5392

#TimeUsernameProblemLanguageResultExecution timeMemory
5392baneling100Cave (IOI13_cave)C++98
0 / 100
2072 ms448 KiB
#include "cave.h" int check[5000], s[5000], d[5000]; void exploreCave(int N) { int i, open=0, x; while(open>=0) { for(i=0 ; i<N ; i++) if(check[i]==0) { s[i]=1-s[i]; x=tryCombination(s); if(x==-1) { open=x; break; } if(open!=x) { check[i]=1; if(open<x) { open=x; break; } } else s[i]=1-s[i]; } } for(i=0 ; i<N ; i++) { s[i]=1-s[i]; d[i]=tryCombination(s); s[i]=1-s[i]; } answer(s,d); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...