#include <bits/stdc++.h>
#include "combo.h"
#define coutf(n, m) cout << fixed << setprecision(n) << m
#define forr(i, a, n) for (int i = a; i < n; i++)
#define forl(i, a, n) for (int i = a; i > n; i--)
#define macos ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define endll "\n"
#define sp " "
typedef long long ll;
using namespace std;
string guess_sequence(int N) {
vector<char> ch = {'A','B','X','Y'};
string p = "";
int coins;
forr(i,0,4){
p += ch[i];
coins = press(p);
if(coins==1){
ch.erase(ch.begin()+i);
break;
}
p.pop_back();
}
int prev = 1;
forr(i,1,N){
forr(j,0,3){
p += ch[j];
coins = press(p);
if(coins!=prev)break;
p.pop_back();
}
prev = coins;
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |