#include "combo.h"
#include "bits/stdc++.h"
using namespace std;
string guess_sequence(int n){
char f = 'x';
vector < char > c = {'A' , 'B' , 'X' , 'Y'};
for(int i = 0;i < 4;i++){
int cnt = 0;
for(int j = 0;j < 4;j++){
string q = "";
q += c[j];
q += c[i];
if(press(q) == 1) cnt++;
}
if(cnt == 4) f = c[i];
}
string ans = "";
ans += f;
for(int i = 1;i < n;i++){
for(int j = 0;j < 4;j++){
string cc = ans;
cc += c[j];
if(press(cc) == cc.size()){
ans = cc;
break;
}
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |