# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1072426 | andrewp | Combo (IOI18_combo) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//Dedicated to my love, ivaziva
//#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = int64_t;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define dbg(x) cerr << #x << ": " << x << '\n';
string guess_sequence(int n) {
char f;
if (press("AB")) {
if (press("A"))
f = 'A';
else
f = 'B';
} else {
if (press("Y") == 1)
f = 'Y';
else
f = 'X';
}
string ans = "";
ans.push_back(f);
int sz = 1;
for (int i = 2; i < n; i++) {
if (f == 'A') {