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"
#include <cassert>
void Solve() {
bool murderer[7] = {};
bool location[11] = {};
bool weapon[7] = {};
for (int i = 1; i < 7; i++) {
murderer[i] = weapon[i] = true;
}
for (int i = 1; i < 11; i++) {
location[i] = true;
}
int m = 1, l = 1, w = 1;
int res = -1;
do {
res = Theory(m, l, w);
if (res == 1) {
murderer[m] = false;
while (!murderer[m]) {
m++;
}
} else if (res == 2) {
location[l] = false;
while (!location[l]) {
l++;
}
} else if (res == 3) {
weapon[w] = false;
while (!weapon[w]) {
w++;
}
}
} while (res != 0);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |