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;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define rep(a,b) for(int a = 0; a < (b); ++a)
#define all(t) t.begin(), t.end()
#define pb push_back
const int INF = 2e9+54321;
const ll INF_L = (ll)2e18+54321;
#include "combo.h"
string guess_sequence(int N)
{
string wyn;
vector<string> zap;
if(press("A") == 1) wyn.pb('A'), zap = {"B","X","Y"};
else if(press("B") == 1) wyn.pb('B'), zap = {"A","X","Y"};
else if(press("X") == 1) wyn.pb('X'), zap = {"A","B","Y"};
else wyn.pb('Y'), zap = {"A","B","X"};
for(int i = 2; i <= N; ++i)
{
if(press(wyn+zap[0]) == i) wyn += zap[0];
else if(press(wyn+zap[1]) == i) wyn += zap[1];
else wyn += zap[2];
}
return wyn;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |