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 <iostream>
#include "grader.h"
#include "cluedo.h"
using namespace std;
void Solve() {
int ans, m, l, w;
int murderer[7], location[11], weapon[7];
for ( m = 1; m <= 6; m++ )
murderer[m] = 1;
for ( l = 1; l <= 10; l++ )
location[l] = 1;
for ( w = 1; w <= 6; w++ )
weapon[w] = 1;
for ( m = 1; m <= 6; m++ ) {
for ( l = 1; l <= 10; l++ ) {
for ( w = 1; w <= 6; w++ ) {
if ( murderer[m] && location[l] && weapon[w] ) {
ans = Theory( m, l, w );
if ( ans == 1 )
murderer[m] = 0;
else if ( ans == 2 )
location[l] = 0;
else if ( ans == 3 )
weapon[w] = 0;
}
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |