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 <iostream>
using namespace std;
string guess_sequence(int n)
{
string s = "";
for (int i = 0; i < n; ++i)
{
if (press(s + 'A' + s + 'B') >= i + 1)
{
if (press(s + 'A') >= i + 1) s += 'A';
else s += 'B';
}
else
{
if (press(s + 'X') >= i + 1) s += 'X';
else s += 'Y';
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |