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 <bits/stdc++.h>
std::string guess_sequence(int N) {
std::string answer = "";
for (int i = 0; i < N; ++i) {
if (press(answer + 'A' + answer + 'B') >= i + 1) {
if (press(answer + 'A') == i + 1) {
answer += 'A';
} else {
answer += 'B';
}
} else {
if (press(answer + 'X') == i + 1) {
answer += 'X';
} else {
answer += 'Y';
}
}
}
return answer;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |