#include "combo.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
using vi = vector<int>;
using pi = pair<int,int>;
string guess_sequence(int N) {
string ans = "";
int tmp = press("AB");
if(!tmp) {
tmp = press("XAXBXY");
if(tmp == 1) ans = "Y";
else ans = "X";
} else {
tmp = press("ABAXAY");
if(tmp == 1) ans = "B";
else ans = "A";
}
int prev = 1;
char c[4] = {'A', 'B', 'X', 'Y'};
for(int i=1; i<N; ++i) {
for(char ch: c) {
tmp = press(ans + ch);
if(tmp == prev+1) {
ans += ch;
++prev;
break;
}
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |