이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |