Submission #713579

#TimeUsernameProblemLanguageResultExecution timeMemory
713579DennisTranCombo (IOI18_combo)C++17
10 / 100
58 ms564 KiB
#pragma GCC optimize("O2") #pragma GCC target("avx,avx2,fma") #include "combo.h" #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = (a); i <= (b); i++) #define FOD(i, a, b) for (int i = (a); i >= (b); i--) #define REP(i, n) for (int i = 0; i < (n); i++) #define ALL(x) (x).begin(), (x).end() #define TIME (1.0 * clock() / CLOCKS_PER_SEC) #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); } using namespace std; const int MAXN = 2e5 + 5; string guess_sequence(int N) { string t = ""; char x0 = 'a'; FOR(i, 1, N) { for (char x : {'A', 'B', 'X', 'Y'}) { if (i > 1 && x == x0) continue; if (i == 1) x0 = x; t += x; if (press(t) == i) break; t.pop_back(); } } return t; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...