#include <bits/stdc++.h>
#include "combo.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define all(X) X.begin(), X.end()
#define allr(X) X.rbegin(), X.rend()
#define pb push_back
#define endl '\n'
using namespace std;
using namespace __gnu_pbds;
int press(string p);
string guess_sequence(int n){
string res = "";
ll cnt = 0;
vector<char>ch = {'A', 'B', 'X', 'Y'};
for(ll i = 0; i < n; i++){
for(ll j = 0; j < 4; j ++){
string temp = res + ch[j];
ll cur = press(temp);
if(cur == temp.size()){
res = temp;
cnt = cur;
break;
}
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |