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 pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
str guess_sequence(int n){
str s = "";
int r = 0;
while(n--){
int ab = press(s+"A"+s+"B");
int xy = press(s+"X"+s+"Y");
if(ab > r){
int a = press(s+"A");
if(a > r){
s+="A";
r = a;
}
else{
s+="B";
r = ab;
}
}
else{
int x = press(s+"X");
if(x > r){
s+="X";
r = x;
}
else{
s+="Y";
r = xy;
}
}
}
return s;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |