제출 #783130

#제출 시각아이디문제언어결과실행 시간메모리
783130Mouad_ouj콤보 (IOI18_combo)C++17
0 / 100
0 ms208 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string tab[4]={"A","B","X","Y"}; int c=0; string ans=""; for(int x=0;x<4;x++) {if(press(tab[x])==1) { c=x; break; }} for(int y=1;y<n;y++) { for(int x=0;x<4;x++) { if(x!=c) { if(press(ans+tab[x])==y+1) { ans+=tab[x]; break; } } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...