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 p = "";
int prev=0,cur=0;
for(int i=0;i<N;i++)
{
p+='A';
cur=press(p);
if(cur==prev)
{
p[p.size()-1]='B';
cur=press(p);
if(cur==prev)
{
p[p.size()-1]='X';
cur=press(p);
if(cur==prev)
{
p[p.size()-1]='Y';
cur=prev+1;
}
}
}
prev=cur;
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |