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 <bits/stdc++.h>
#include "grader.h"
#include "cluedo.h"
using namespace std;
void Solve() {
int r;
int a, b, c;
set<int> murderer = {1, 2, 3, 4, 5, 6};
set<int> location = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
set<int> weapon = {1, 2, 3, 4, 5, 6};
for (int i = 1; i <= 10; i++) {
r = Theory(i, i, i);
if (r == 0) return;
else if (r == 1) murderer.erase(i);
else if (r == 2) location.erase(i);
else if (r == 3) weapon.erase(i);
}
a = (int)*murderer.begin();
b = (int)*location.begin();
c = (int)*weapon.begin();
r = Theory(a, b, c);
if (!r) return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |