Submission #1294179

#TimeUsernameProblemLanguageResultExecution timeMemory
1294179lucaskojimaCombo (IOI18_combo)C++17
10 / 100
15 ms456 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...