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) {
std::string S = "";
for (int n = 1; n <= N; ++n) {
std::string p1 = S + "A";
std::string p2 = S + "B";
std::string p3 = S + "X";
std::string p4 = S + "Y";
if (press(p1) == n) S = p1;
else if (press(p2) == n) S = p2;
else if (press(p3) == n) S = p3;
else if (press(p4) == n) S = p4;
}
return S;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |