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>
using namespace std;
string button[] = {"A", "B", "X", "Y"};
string guess_sequence(int N) {
string S = "";
for(int i=0; i<3; i++) {
if(press(button[i])) {
S+=button[i];
break;
}
}
if(S.empty()) S+="Y";
for(int i=0; i<4; i++) {
for(int j=0; j<3; j++) {
if(press(S + button[i] + button[j]) == 3) return S + button[i] + button[j];
}
}
return S + "YY";
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |