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 <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int n) {
string ans;
for (int i = 1; i <= n; i++) {
string cope = ans + 'A' + ans + 'B';
int d = press(cope);
if (d >= i) {
cope = ans + 'A';
d = press(cope);
if (d >= i) {
ans += 'A';
} else {
ans += 'B';
}
} else {
cope = ans + 'X';
d = press(cope);
if (d >= i) {
ans += 'X';
} else {
ans += 'Y';
}
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |