제출 #1125221

#제출 시각아이디문제언어결과실행 시간메모리
1125221ZyadH1콤보 (IOI18_combo)C++20
10 / 100
29 ms464 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; } if(i == 2) { p = ans; p += buttons[3]; ans = p; coins ++; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...