제출 #1128586

#제출 시각아이디문제언어결과실행 시간메모리
1128586ElayV13콤보 (IOI18_combo)C++20
5 / 100
0 ms408 KiB
#include "combo.h" #include "bits/stdc++.h" using namespace std; string guess_sequence(int n){ char f = 'x'; vector < char > c = {'A' , 'B' , 'X' , 'Y'}; for(int i = 0;i < 4;i++){ int cnt = 0; for(int j = 0;j < 4;j++){ string q = ""; q += c[j]; q += c[i]; if(press(q) == 1) cnt++; } if(cnt == 4) f = c[i]; } string ans = ""; ans += f; for(int i = 1;i < n;i++){ for(int j = 0;j < 4;j++){ string cc = ans; cc += c[j]; if(press(cc) == cc.size()){ ans = cc; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...