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"
using namespace std;
std::string guess_sequence(int N) {
string ANS;
string m[] = {"A", "B", "X", "Y"};
int mx = 0;
string mxChar;
for (int i = 0; i < N; i++) {
for (string j : m) {
if (i && ANS[0] == j[0])
continue;
int score = press(ANS+j);
if (score > mx) {
mx = score;
mxChar = j;
}
}
ANS += mxChar;
}
return ANS;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |