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"
using namespace std;
string guess_sequence(int N) {
string p="",s="";
for(int i=1;i<=N;i++)
{
p.push_back('A');
if(press(p)==i)
{
s.push_back('A');
continue;
}
p.pop_back();
p.push_back('B');
if(press(p)==i)
{
s.push_back('B');
continue;
}
p.pop_back();
p.push_back('X');
if(press(p)==i)
{
s.push_back('X');
continue;
}
p.pop_back();
p.push_back('Y');
s.push_back('Y');
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |