Submission #721010

#TimeUsernameProblemLanguageResultExecution timeMemory
721010dungnguyenn_05Cluedo (IOI10_cluedo)C++17
100 / 100
12 ms292 KiB
#include<bits/stdc++.h> #include "grader.h" #include "cluedo.h" using namespace std; bool a[20],b[20],c[20]; void reset() { for(int i=1;i<11;i++) a[i]=b[i]=c[i]=0; } void Solve() { while(1) { bool ok=0; for(int i1=1;i1<7;i1++) if(!a[i1]) { for(int i2=1;i2<11;i2++) if(!b[i2]) { for(int i3=1;i3<7;i3++) if(!c[i3]) { int val=Theory(i1,i2,i3); if(!val) { reset(); return; } if(val==1) a[i1]=1; if(val==2) b[i2]=1; if(val==3) c[i3]=1; ok=1; break; } if(ok) break; } if(ok) break; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...