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 < 3; ++j) {
string t = s; t += keys[j];
if (press(t) > i) {
s += keys[j];
break;
}
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |