제출 #1286062

#제출 시각아이디문제언어결과실행 시간메모리
1286062harryleee콤보 (IOI18_combo)C++20
100 / 100
8 ms480 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int n){ string a = "A", b = "B", x = "X", y = "Y", res = ""; if (press(a + b) > 0){ if (press(a)){ res += a; a = y; } else{ res += b; b = y; } } else{ if (press(x)){ res += x; x = y; } else res += y; } for (int i = 2; i < n; ++i){ int val = press(res + a + res + b + a + res + b + b + res + b + x); if (val == i) res += a; else if (val == i - 1) res += x; else res += b; } if (n - 1 > 0){ if (press(res + a) == n) res += a; else if (press(res + b) == n) res += b; else res += x; } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...