제출 #855674

#제출 시각아이디문제언어결과실행 시간메모리
855674IS_Rushdi콤보 (IOI18_combo)C++17
0 / 100
0 ms344 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; typedef long long ll; string guess_sequence(int N) { string p = ""; string x = "ABXY"; char z = 'A'; for(int i = 0; i < 4; i++){ p+=x[i]; int coin = press(p); if(coin == 1) z = x[i]; p = ""; } string S = ""; S+=z; for(int i = 2; i <= N; i++){ for(int j = 0; j < 4; j++){ if(x[j] == z) continue; p = S + x[j]; int coin = press(p); if(coin == i+1){ S+=x[j]; break; } } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...