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 = "";
string S = "";
string patron = "ABXY";
if(press("A")) S="A";
else if(press("B")) S="B";
else if(press("X")) S="X";
else S="Y";
char primera_letra=S[0];
for(int i=2;i<=N;i++){
//Recorremos el patron
for(int j=0;j<4;j++){
if(patron[j]!=primera_letra){
if(press(S+patron[j])==i){
S=S+patron[j];
break;
}
}
}
}
return S;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |