# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1206941 | a1m4n | 콤보 (IOI18_combo) | C++20 | 0 ms | 0 KiB |
#ifdef AIMAN
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#include "combo.h"
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define pb push_back
#define eb emplace_back
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("O2")
using ll = long long;
ll inf = 1e9;
using namespace std;
int press(const string &x){
cout << x << "\n" <<flush;
int res;
if(!cin >> res){
exit(0);
}
return res;
}
string guess_sequence(int N){
static const char c[4] = {'A' , 'B' , 'X' , 'Y'}; string p;
for(int i = 0;i < 4; i++){
string q(1, c[i]);
if(press(q) == 1){
p = q;
break;
}
}
for(int i = 1; i < N; i++){
for(int j = 0; j < 4; j++){
string q = p;
q.pb(c[j]);
if(press(q) == i + 1){
p.pb(c[j]);
break;
}
}
}
return p;
}
void solve(){
}
int main(){
ios::sync_with_stdio(false); cin.tie(0);solve();
return 0;
}