# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1078389 | sqrteipi | Cluedo (IOI10_cluedo) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#ifdef __cplusplus
extern "C" {
#endif
int Theory(int M, int L, int W);
void Solve();
#ifdef __cplusplus
}
#endif
// TODO: global variables can be declared here
void Solve() {
bool m[6], l[10], w[6];
int a=0, b=0, c=0, i, rt;
for (i=0; i<6; i++){
m[i] = true; l[i] = true; w[i] = true;
}
for (i=6; i<10; i++){
l[i] = true;
}
for (i=0; i<20; i++){
while (!m[a]){
a++;
}
while (!l[b]){
b++;
}
while (!w[c]){
c++;
}
rt = Theory(a+1, b+1, c+1);
if (rt==0){
break;
}
else if (rt==1){
m[a] = false;
}
else if (rt==2){
l[b] = false;
}
else{
w[c] = false;
}
}
}