# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1132241 | bobthescience | Combo (IOI18_combo) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
#include "combo.h"
using namespace std;
std::string guess_sequence(int N) {
string p = "";
int ord;
vector<char> add = {'A', 'B', 'X', 'Y'};
for (int i = 0;i < 4;i++) {
if (press("" + add[i])) {
add.erase(add.begin() + i);
break;
}
}
for (int i = 1;i < N;i++) {
for (char c :add) {
if (press(p + c) > i) {
r++;
p += c;
break;
}
}
}
return p;
}