제출 #1088022

#제출 시각아이디문제언어결과실행 시간메모리
1088022Roupiq콤보 (IOI18_combo)C++17
100 / 100
21 ms1408 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; #define len(x) (int)x.size() string guess_sequence(int N) { string B = "ABXY"; int first = 2 * !!press("XY") + !!press("BY"); string res(1, B[first]); if (N == 1) return res; B.erase(B.begin() + first); while (len(res) <= N - 2) { string check = res + B[1] + res + B[2] + B[0] + res + B[2] + B[1] + res + B[2] + B[2]; int w = press(check) - len(res); res += B[w]; } return res + B[2 * press(res + B[2]) + press(res + B[1]) - 3 * N + 3]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...