Submission #16265

#TimeUsernameProblemLanguageResultExecution timeMemory
16265CodingBugCave (IOI13_cave)C++98
0 / 100
41 ms512 KiB
#include "cave.h" #define M 5000 void exploreCave(int N) { bool ch[N]; int s[N],a[N],i,j; for(i=0;i<N;i++){ ch[i]=false; s[i]=0; a[i]=0; } for(i=0;i<N;i++){ int p,p2=tryCombination(s); int st,ed,mi; for(st=0,ed=N-1;st<ed;p!=(p2=tryCombination(s)) ? st=mi+1 : ed=mi){ p=p2; mi=(st+ed)/2; for(j=mi+1;j<=ed;j++) if(!ch[j]) s[j]=!s[j]; } if(p2==i) s[st]=!s[st]; ch[st]=true; a[st]=i; } answer(s,a); }
#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...