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;
string guess_sequence(int N){
char first = 'A';
string res = "";
if(press("B")) first = 'B';
if(press("X")) first = 'X';
if(press("Y")) first = 'Y';
res += first;
for(int i = 2; i <= N; i ++){
for(auto x: {'A', 'B', 'X', 'Y'}){
if(x == first) continue;
if(press(res + x) == i){
res += x;
break;
}
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |