# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
348298 | Halogen | Combo (IOI18_combo) | C++14 | 71 ms | 428 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.
#include "combo.h"
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++) {
bool check = false;
for (int i = 0; i < 4; ++i) {
if (i == first) continue;
if (press(p + lst[i]) != p.size() + 1) continue;
check = true;
if (j == 0) first = i;
p += lst[i];
break;
}
if (!check) return p;
}
return p;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |