#include<bits/stdc++.h>
using namespace std;
int press(string p);
string guess_sequence(int n){
string ans="";
int cur=1;
if(press("A")==1) ans="A";
else if(press("B")==1) ans="B";
else if(press("C")==1) ans="C";
else ans="D";
while(cur<n){
if(ans[0]!='A'&&press(ans+'A')>cur){
cur++;
ans+='A';
}else if(ans[0]!='B'&&press(ans+'B')>cur){
cur++;
ans+='B';
}else if(ans[0]!='X'&&press(ans+'X')>cur){
cur++;
ans+='X';
}else{
cur++;
ans+='Y';
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |