# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383682 | wlh_code | Combo (IOI18_combo) | C++17 | 55 ms | 540 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"
using namespace std;
string guess_sequence (int N) {
string keys = "ABXY"; string s;
for (int i = 0; i < 4; ++i) {
string t; t += keys[i];
if (press(t)) {
s += keys[i];
keys.erase(keys.begin() + i);
break;
}
}
for (int i = 1; i < N; ++i) {
for (int j = 0; j < 2; ++j) {
string t = s; t += keys[j];
if (press(t) > i) {
s += keys[j];
break;
}
}
if (s.length() == i) s += keys[2];
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |