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"
char terms[4] = {'A', 'B', 'X', 'Y'};
std::string guess_sequence(int N) {
std::string p = "";
std::string answer = "";
for(int i = 0; i < N; i++){
p = answer + terms[0] + answer + terms[1];
if(press(p) > i){
p = answer + terms[0];
if(press(p) > i){
answer += terms[0];
}
else{
answer += terms[1];
}
}
else{
p = answer + terms[2];
if(press(p) > i){
answer += terms[2];
}
else{
answer += terms[3];
}
}
}
return answer;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |