제출 #982356

#제출 시각아이디문제언어결과실행 시간메모리
982356batsukh2006콤보 (IOI18_combo)C++17
0 / 100
1 ms344 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int N){ string t="ABXY",ans=""; for(int i=0; i<3; i++){ string r=""; r+=t[i]; if(press(r)) ans+=t[i]; } string s=""; if(ans.size()==0) ans+=t[3]; for(int i=0; i<4; i++){ string r=""; r+=t[i]; if(r!=ans) s+=t[i]; } for(int i=1; i<N; i++){ string tmp=""; tmp+=ans+s[0]; tmp+=ans+s[1]+s[0]; tmp+=ans+s[1]+s[1]; tmp+=ans+s[1]+s[2]; int lst=ans.size(); int find=press(tmp); if(find==lst) ans+=s[2]; else if(find==lst+1) ans+=s[0]; else ans+=s[1]; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...