제출 #523421

#제출 시각아이디문제언어결과실행 시간메모리
523421dron_rp콤보 (IOI18_combo)C++14
10 / 100
62 ms440 KiB
#include "combo.h" #include <set> #include <iostream> using namespace std; string guess_sequence(int N) { string S = ""; set<char> a = {'A', 'B', 'X', 'Y'}; string p = ""; for (auto& c : a){ p = ""; p += c; int coins = press(p); if (coins == 1){ S += c; a.erase(c); break; } } while ((int) S.size() < N){ for (auto& c : a){ p = S; p += c; int coins = press(p); if (coins == (int) S.size()+1){ S += c; break; } } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...