Submission #1125218

#TimeUsernameProblemLanguageResultExecution timeMemory
1125218ZyadH1Combo (IOI18_combo)C++17
0 / 100
0 ms408 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { string p , buttons = "ABXY"; string ans = ""; int coins = 0; while(coins != N){ for(int i = 0 ; i < buttons.size() ;i++){ p = ans; p += buttons[i]; if(p.size() > 1 and buttons[i] == p[0]) continue; coins = press(p); if(coins == p.size()){ ans = p; break; } else if(i == 2) { ans += buttons[3]; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...