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<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
char isi[4]={'A','B','X','Y'};
ll i,aw;
string s;
std::string guess_sequence(int N)
{
aw=3;
if(press("AABB"))
{
if(press("AA"))
aw=0;
else
aw=1;
}
else
{
if(press("XX"))
aw=2;
else
aw=3;
}
s=isi[aw];
swap(isi[aw],isi[3]);
for(i=1;i<N-1;i++)
{
ll tem=press(s+isi[0]+isi[0]+s+isi[0]+isi[1]+s+isi[0]+isi[2]+s+isi[1]);
if(tem==i)
s+=isi[2];
else
if(tem==i+1)
s+=isi[1];
else
s+=isi[0];
}
if(N>1)
{
if(press(s+isi[0])==N)
s+=isi[0];
else
if(press(s+isi[1])==N)
s+=isi[1];
else
s+=isi[2];
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |