# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1191842 | p4r4d0_x | Combo (IOI18_combo) | C++20 | 0 ms | 0 KiB |
#include "combo.h"
#include<bits/stdc++.h>
using namespace std;
string guess_sequence(int N) {
vector<char> a = {'A', 'B', 'X', 'Y'};
string s = "";
for(int i = 0; i < 4; ++i){
s += a[i];
if(press(s) == 1){
break;
}
else s = "";
}
string st = "";
for(int i = 0; i < 4; ++i){
st = s;
st += a[i];
if(press(st) == 2){
s = st;
break;
}
}
for(int i = 0; i < 4; ++i){
st = s;
st += a[i];
if(press(st) == 3){
s = st;
break;
}
}
return S;
}