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;
string guess_sequence(int N) {
string p = "ABXY";
int score = 0;
char out = 'Z';
string guess = "";
while (score != N)
{
for (char c: p)
{
if (c != out)
{
int res = press(guess+c);
if (res - score > 0){
score++;
guess += c;
if (score == 1) out = c;
break;
}
}
}
}
return guess;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |