# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
210706 | socho | Cluedo (IOI10_cluedo) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "cluedo.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;
}
}
}
}