Submission #921471

#TimeUsernameProblemLanguageResultExecution timeMemory
921471IntellegentCombo (IOI18_combo)C++17
10 / 100
27 ms596 KiB
#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 int press(string p); 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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...