Submission #567557

#TimeUsernameProblemLanguageResultExecution timeMemory
567557valerikkCombo (IOI18_combo)C++17
10 / 100
62 ms544 KiB
#include "combo.h" #include <vector> #include <string> #include <algorithm> std::string guess_sequence(int N) { static const char buttons[] = { 'A', 'B', 'X', 'Y' }; std::string s = ""; for (int i = 0; i < N; ++i) { for (int j = 0; j < 4; ++j) { if (j == 3 || press(s + buttons[j]) == i + 1) { s += buttons[j]; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...