# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383829 | 2021-03-30T20:53:46 Z | MODDI | Cluedo (IOI10_cluedo) | C++14 | 0 ms | 0 KB |
#include "grader.h" #include "cluedo.h" void Solve(){ bool killer[6], locations[10], weapon[6]; memset(killer, true,sizeof(killer)); memset(locations, true, sizeof(locations)); memset(weapon, true, sizeof(weapon)); for(int i = 1; i <= 6; i++){ if(!killer[i-1]) continue; for(int j = 1; j <= 10; j++){ if(!locations[j-1]) continue; for(int k = 1; k <= 6; k++){ if(!weapon[k-1]) continue; int call = Theory(i, j, k); if(call == 0) return ; if(call == 1) killer[i-1] = false; if(call == 2) locations[j-1] = false; if(call == 3) weapon[k-1] = false; } } } }