# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1130298 | sohamsen15 | Cluedo (IOI10_cluedo) | C++20 | 0 ms | 0 KiB |
#include "grader.h"
#include "cluedo.h"
void Solve() {
vector<int> a(6, 0);
vector<int> b(10, 0);
vector<int> c(6, 0);
for (int i = 0; i < 6; i++)
for (int j = 0; j < 10; j++)
for (int k = 0; k < 6; k++) {
if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue;
int r = Theory(i + 1, j + 1, k + 1);
if (r == 0) return;
else if (r == 1) a[i] = 1;
else if (r == 2) b[j] = 1;
else c[k] = 1;
}
}