# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
348542 | Halogen | Combo (IOI18_combo) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
std::string guess_sequence(int N) {
char lst[4] = {'A', 'B', 'X', 'Y'};
std::string p = "";
int first = 4;
for (int j = 0; j < N; j++) {
if (press(p + lst[0] + p + lst[1]) >= p.size() + 1) {
if (press(p + lst[0]) == p.size() + 1) p += lst[0];
else p += lst[1];
}
else if (press(p + lst[2]) == p.size() + 1) p += lst[2];
else p += lst[3];
}
return p;
}