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 <string>
#include <iostream>
using namespace std;
std::string guess_sequence(int N) {
string current = "";
for(int i = 0; i < N; ++i) {
int g1 = press(current + "A" + current + "B");
int g2 = press(current + "A" + current + "X");
if(g1 != i && g2 != i) current += "A";
if(g1 != i && g2 == i) current += "B";
if(g1 == i && g2 != i) current += "X";
if(g1 == i && g2 == i) current += "Y";
}
return current;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |