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 p = "";
int cur=0;
char an[]={'A', 'B', 'X', 'Y'};
for (int i = 0; i < N; ++i) {
std::string jk[]={p+'A', p+'B', p+'X', p+'Y'};
for (int j=0; j<4; j++){
int c=press(jk[j]);
if (c==cur+1){
cur++;
p+=an[j];
}
}
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |