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>
using namespace std;
template <typename T> using ve = vector<T>;
template <typename T, int sz> using ar = array<T, sz>;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
#define endl '\n'
int press(string p);
string guess_sequence(int N) {
    string s= "";
    for(int i = 0; i < N; i++){
        for(char j : {'A', 'B', 'X', 'Y'}){
            if(i > 0 && j == s[i]){
                continue;
            }
            int sc = press(s + j);
            if(sc == (i+1)){
                s += j;
                break;
            }
        }
    }
    return s;
};
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict | Execution time | Memory | Grader output | 
|---|
| Fetching results... |