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 "combo.h"
using namespace std;
string guess_sequence(int N) {
string p = "";
int c=1;
if(press("A")) p+="A";
else if(press("B")) p+="B";
else if(press("X")) p+="X";
else p+="Y";
while(c<N){
if('A'!=p[0] && press(p+"A")==c+1) p+="A";
else if(p[0]!='B' && press(p+"B")==c+1) p+="B";
else if(p[0]!='X' && press(p+"X")==c+1) p+="X";
else if(p[0]!='Y' && press(p+"Y")==c+1) p+"Y";
c++;
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |