Submission #1046611

#TimeUsernameProblemLanguageResultExecution timeMemory
1046611JerCombo (IOI18_combo)C++17
0 / 100
31 ms344 KiB
#include "combo.h" using namespace std; string guess_sequence(int n) { int res = -1; string letters[] = {"A", "B", "Y", "X"}, start, curr; for (auto x : letters) { start = x; if (press(x) == 1) break; } curr = start; while ((int)curr.size() < n) { for (auto x : letters) { if (x != start) res = press(start + x); if (res > (int)curr.size()) { curr += x; break; } } } return curr; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...