# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
921470 | Intellegent | 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.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(x) cout << #x << " = " << x << "\n";
#define vdebug(a) cout << #a << " = "; for(auto x: a) cout << x << " "; cout << "\n";
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define random(a, b) rng() % (b - a + 1) + a
string guess_sequence(int n){
string alpha = "ABXY";
string cur = "";
for (char c : alpha){
for (int i = 0; i < n; i++) cur += c;
if (press(cur) > 0) break;
cur = "";
}
string new_alpha = "";
for (char c : alpha) if (c != cur[0]) new_alpha += c;
alpha = new_alpha;
for (int i = 1; i < n; i++){
for (char c : alpha){
cur[i] = c;
if (press(cur) > i) break;
}
}
return cur;
}