Submission #210707

#TimeUsernameProblemLanguageResultExecution timeMemory
210707sochoCluedo (IOI10_cluedo)C++14
100 / 100
18 ms424 KiB
#include "cluedo.h" #include "grader.h" #include "bits/stdc++.h" using namespace std; void Solve(){ bool a[7]; bool b[11]; bool c[7]; memset(a, 1, sizeof a); memset(b, 1, sizeof b); memset(c, 1, sizeof c); for (int i=1; i<=6; i++) { for (int j=1; j<=10; j++) { for (int k=1; k<=6; k++) { if (!a[i]) continue; if (!b[j]) continue; if (!c[k]) continue; int f = Theory(i, j, k); if (f == 0) return; if (f == 1) a[i] = false; if (f == 2) b[j] = false; if (f == 3) c[k] = false; } } } for (int i=1; i<=6; i++) { for (int j=1; j<=10; j++) { for (int k=1; k<=6; k++) { if (!a[i]) continue; if (!b[j]) continue; if (!c[k]) continue; Theory(i, j, k); return; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...