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 <iostream>
#include <vector>
#include "combo.h"
#define endl '\n'
#define ll long long int
using namespace std;
string guess_sequence(int N)
{
vector<char> LETTERS = { 'A', 'B', 'X', 'Y' };
string S = ".";
for(auto&& l : LETTERS)
{
S[0] = l;
if(press(S) > 0)
break;
}
for(int i = 1 ; i < N ; ++i)
{
S += ".";
for(auto&& l : LETTERS)
{
if(l == S[0])
continue;
S[i] = l;
if(press(S) == i + 1)
break;
}
}
return S;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |