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"
#include <vector>
#include <string>
#include <algorithm>
std::string guess_sequence(int N) {
static const char buttons[] = { 'A', 'B', 'X', 'Y' };
std::string s = "";
for (int i = 0; i < N; ++i) {
for (int j = 0; j < 4; ++j) {
if (j == 3 || press(s + buttons[j]) == i + 1) {
s += buttons[j];
break;
}
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |