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 <bits/stdc++.h>
void Solve(){
bool killer[6], locations[10], weapon[6];
memset(killer, true,sizeof(killer));
memset(locations, true, sizeof(locations));
memset(weapon, true, sizeof(weapon));
for(int i = 1; i <= 6; i++){
if(!killer[i-1])
continue;
for(int j = 1; j <= 10; j++){
if(!locations[j-1]) continue;
for(int k = 1; k <= 6; k++){
if(!weapon[k-1]) continue;
int call = Theory(i, j, k);
if(call == 0)
return ;
if(call == 1)
killer[i-1] = false;
if(call == 2)
locations[j-1] = false;
if(call == 3)
weapon[k-1] = false;
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |