#pragma GCC optimize ("Ofast")
#pragma GCC target ("avx,avx2")
#pragma GCC optimize ("trapv")
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cin.exceptions(cin.failbit);
#define rep(i, a, b) for(lli i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define sz(x) (lli)(x).size()
#define what_is(x) cerr << #x << " is " << x << endl;
#define wis cout<<endl<<"I already speak english, bitch"<<endl<<endl;
typedef long long int lli;
typedef vector<lli> vi;
typedef pair<lli,lli> ii;
typedef vector<ii> vii;
typedef pair<ii,lli> iii;
#define trace(args...) { string _s =#args; replace(_s.begin(), _s.end(), ',',' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args);}
void err(istream_iterator<string> it){}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args){
cout << *it << " : " << a << endl;
err(++it, args...);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
using namespace __gnu_pbds;
template <typename T, class compare>
using ordered_set = tree<T, null_type, compare, rb_tree_tag, tree_order_statistics_node_update>;
//usage: ordered_set< el tipo , el comparador> nombre;
string guess_sequence(int n){
string wyn;
vector<char> let={'A','B','X','Y'};
char ban;
for(auto x : let){
string hol;hol+=x;
if(press(hol)){
ban=x;
break;
}
}
wyn+=ban;
int len=1;
rep(i,1,n){
for(auto x : let){
if(x==ban) continue;
if(press(wyn+x)==len+1){
wyn+=x;
len++;
break;
}
}
}
return wyn;
}
Compilation message
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:49:6: error: 'press' was not declared in this scope
49 | if(press(hol)){
| ^~~~~
combo.cpp:59:7: error: 'press' was not declared in this scope
59 | if(press(wyn+x)==len+1){
| ^~~~~