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"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int N){
char arr[4]={'A','B','X','Y'};
string s="",ss;
int c=0;
for(int i=1;i<=N;i++){
for(int l=0;l<4;l++){
ss=s;
c++;
if(s[0]==arr[l]){
continue;
}
ss+=arr[l];
if(press(ss)==i){
s=ss;
break;
}
}
}
if(c<=N+10){
while(c<=N+10){
press("XX");
c++;
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |