Submission #1280811

#TimeUsernameProblemLanguageResultExecution timeMemory
1280811lalbertoo89Combo (IOI18_combo)C++20
5 / 100
25 ms480 KiB
#include <bits/stdc++.h> using namespace std; #include "combo.h" string guess_sequence(int N){ string buttons = "ABXY"; string S = ""; string first; for(char c : buttons){ if(press(string(1, c)) > 0){ first = c; break; } } S += first; int m = S.size(); while(m < N){ bool f = false; for(char c : buttons) { string s1 = S+c; int coins = press(s1); if(coins == s1.size()){ S+=c; f = true; break; } } if(!f) break; } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...