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(){
bool a[7], b[11], c[7];
for(int i= 1;i<=6;i++) a[i] =1;
for(int i= 1;i<=10;i++) b[i] =1;
for(int i= 1;i<=6;i++) c[i] =1;
for(int i= 1;i<=20;i++){
int m = 0, l = 0, w = 0;
for(int j = 1;j<=6;j++){
if(a[j] == 1) {
m = j;
break;
}
}
for(int j = 1;j<=10;j++){
if(b[j] == 1) {
l = j;
break;
}
}
for(int j = 1;j<=6;j++){
if(c[j] == 1) {
w = j;
break;
}
}
int res = Theory(m, l, w);
if(res == 0){
return;
}
if(res == 1){
a[m] = 0;
} else if(res == 2) {
b[l] = 0;
} else {
c[w] = 0;
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |