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>
using namespace std;
string guess_sequence(int N) {
string S = "";
char p[] = {'A', 'B', 'X', 'Y'};
if(N == 3){
for(int i = 0; i<4; ++i){
S = "A";
S += p[i];
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
}
}
for(int i = 0; i<4; ++i){
S = "B";
S += p[i];
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
}
}
for(int i = 0; i<4; ++i){
S = "X";
S += p[i];
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
}
}
for(int i = 0; i<4; ++i){
S = "Y";
S += p[i];
for(int j = 0; j<4; ++j){
S += p[j];
if(press(S) == 3)return S;
}
}
}
return S;
}
//ABXY
// ABX , ABY , AXY, BXY
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |