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