#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int n){
string s = "";
char chk = 'w';
vector < char > cur{'A', 'B', 'X', 'Y'};
for(int i = 1; i <= n; i++){
int cnt = 0;
string sc;
for(auto in : cur){
if(in == chk) continue;
sc = s; sc += in;
cnt++;
if(cnt == 3 && chk != 'w') break;
if(cnt == 4 && chk == 'w') break;
if(press(sc) == s.size() + 1) break;
}
if(i == 1) chk = sc[0];
s = sc;
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |