# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1214467 | cuenta_verdadera | Cluedo (IOI10_cluedo) | C++20 | 0 ms | 0 KiB |
#include <cassert>
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
static int M,L,W,gotit,cnt,maxcnt;
int Theory(int m, int l, int w) {
++cnt;
if (m < 1 || m > 6 || l < 1 || l > 10 || w < 1 || w > 6) exit(92);
if (rand()%2 && m != M) return 1;
else if (rand()%2 && l != L) return 2;
else if (rand()%2 && w != W) return 3;
else if (m != M) return 1;
else if (l != L) return 2;
else if (w != W) return 3;
gotit = 1;
return 0;
}
void Solve(){
int r,a=1,b=1,c=1;
r = Theory(a,b,c);
if (r == 1) Theory(a++,b,c);
if (r == 2) Theory(a,b++,c);
if (r == 3) Theory(a,b,c++);
if (r == 0) return;
}