#include "bits/stdc++.h"
using namespace std;
#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#include "cluedo.h"
#include "grader.h"
#endif
#ifdef duc_debug
int cnt;
int rm, rl, rw;
int Theory(int M, int L, int W) {
++cnt;
if(M == rm and L == rl and W == rw) return 0;
vector<int> choose;
if(M != rm) choose.push_back(1);
if(L != rl) choose.push_back(2);
if(W != rw) choose.push_back(3);
random_shuffle(choose.begin(), choose.end());
return choose.back();
}
#endif
void Solve() {
int a = 1, b = 1, c = 1;
while(true) {
int reply = Theory(a, b, c);
if(reply == 0) return;
if(reply == 1) ++a;
else if(reply == 2) ++b;
else ++c;
}
}
#ifdef duc_debug
void solve() {
int tt; cin >> tt;
while(tt--) {
cin >> rm >> rl >> rw;
cnt = 0;
Solve();
if(cnt > 20) {
assert(false);
}
}
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
solve();
return 0;
}
#endif
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |