# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
379875 | 2021-03-19T15:19:12 Z | knightron0 | Cluedo (IOI10_cluedo) | C++14 | 0 ms | 0 KB |
#include <bits/stdc++.h> #include "cluedo.h" using namespace std; void Solve(){ bool a[7], b[11], c[7]; for(int i= 1;i<=6;i++) a[i] =1; for(int i= 1;i<=10;i++) b[i] =1; for(int i= 1;i<=6;i++) c[i] =1; for(int i= 1;i<=20;i++){ int m = 0, l = 0, w = 0; for(int j = 1;j<=6;j++){ if(a[j] == 1) { m = j; break; } } for(int j = 1;j<=10;j++){ if(b[j] == 1) { l = j; break; } } for(int j = 1;j<=6;j++){ if(c[j] == 1) { w = j; break; } } int res = Theory(m, l, w); if(res == 0){ return; } if(res == 1){ a[m] = 0; } else if(res == 2) { b[l] = 0; } else { c[w] = 0; } } }