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