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>
#include "combo.h"
using namespace std;
string guess_sequence(int n)
{
string ret, but = "ABX";
for (int i = 0; i < n; i++)
{
bool suc = false;
for (int j = 0; j < 3 && !suc; j++)
if (press(ret + but[j]) == (int)ret.size() + 1)
{
ret += but[j];
suc = true;
}
if (!suc)
ret += "Y";
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |