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 p = "";
for (int i = 0; i < N; i++) {
string p1 = p+"A"+p+"B";
int score = press(p1);
if (score > i) {
string p2 = p+"A";
score = press(p2);
if (score > i) {
p += "A";
} else {
p += "B";
}
} else {
string p2 = p+"X";
score = press(p2);
if (score > i) {
p += "X";
} else {
p += "Y";
}
}
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |