# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1069939 | vjudge1 | Cluedo (IOI10_cluedo) | C++17 | 129 ms | 344 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 "grader.h"
#include "cluedo.h"
void Solve() {
// Определение возможных значений
const int num_murderers = 6;
const int num_locations = 10;
const int num_weapons = 6;
// Инициализация переменных
int correctMurderer = -1;
int correctLocation = -1;
int correctWeapon = -1;
// Попробуем перебор
for (int m = 1; m <= num_murderers; ++m) {
for (int l = 1; l <= num_locations; ++l) {
for (int w = 1; w <= num_weapons; ++w) {
int result = Theory(m, l, w);
if (result == 0) {
correctMurderer = m;
correctLocation = l;
correctWeapon = w;
return;
} else if (result == 1) {
// Убийца неверен, исключаем `m`
} else if (result == 2) {
// Место неверно, исключаем `l`
} else if (result == 3) {
// Оружие неверно, исключаем `w`
}
}
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |