# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
477043 | Genius3435 | Combo (IOI18_combo) | C++17 | 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;
const int t = chrono::high_resolution_clock::now().time_since_epoch().count();
string guess_sequence(int N) {
static mt19937 rng = mt19937(t%10000/10);
string cur = ""; cur.reserve(N);
for (int i = 0; i < N; ++i) {
const char *s = "ABXY";
int order = rng() % 24;
for (int o = 4; o >= 1; --o) {
cur += s[order%o], order /= o;
if (press(cur) == i+1) break;
cur.pop_back();
}
}
return cur;
}