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 "combo.h"
using namespace std;
const int mxN = 2005;
string guess_sequence(int n) {
string p = "", comb;
if(press("A") == 1)
p = "A", comb = "BXY";
else if(press("B") == 1)
p = "B", comb = "AXY";
else if(press("X") == 1)
p = "X", comb = "ABY";
else
p = "Y", comb = "ABX";
while((int) p.length() < n) {
for(int i = 0; i < 3; i++) {
if(press(p+comb[i]) == (int) p.length()+1) {
p += comb[i];
break;
}
}
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |