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 <iostream>
using namespace std;
string guess_sequence(int N) {
int l=0;
string p="A";
do {
int k=press(p);
if (k>l){
l=k;
p+="A";
continue;
}
if (k==l){
if (p.back()=='A') p.back()='B';
else if (p.back()=='B') p.back()='X';
else p.back()='Y';
}
} while (l<N);
p.pop_back();
// cerr << p << " (ans)";
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |