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>
#define fto(i, a, b) for (int i = a; i <= b; ++i)
using namespace std;
int n;
string haha[5] = {"A", "B", "X", "Y"};
int press(string p);
string guess_sequence(int n){
int hoho, hehe = 0;
string ohno = "", tmp = "", G = "";
fto(i, 1, n){
fto(j, 0, 3){
if (ohno == haha[j]) continue;
tmp = G + haha[j];
hoho = press(tmp);
fflush(stdout);
if (hehe < hoho){
hehe = hoho;
G = tmp;
break;
}
}
if (i == 1){
ohno = G;
}
}
return G;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |