#include "bits/stdc++.h"
#include "combo.h"
#define sz(x) (int)size(x)
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
mt19937 rng(time(0));
string guess_sequence(int n) {
string ans;
vector<char> v = {'A', 'B', 'X', 'Y'};
for (int i = 0; i < n; i++) {
shuffle(all(v), rng);
for (char c : v) {
string cur = ans;
cur.push_back(c);
int x = press(cur);
if (x == i + 1) {
ans = cur;
break;
}
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |