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 a = {'A','B','X','Y'};
string ans,gues = "a";
char ff = 'z';
int l = 0,c = 0;
for(int i = 0; i<n; i++){
for(int j = 0; j<4; j++)
{
if(a[j]==ff)continue;
gues[i] = a[j];
c = press(gues);
if(i == 0){
if(c>l)ff = a[j];
}
if(c>l){
ans.push_back(a[j]);
gues.push_back('a');
l = c;
continue;
}
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |