제출 #648851

#제출 시각아이디문제언어결과실행 시간메모리
648851Litusiano콤보 (IOI18_combo)C++14
30 / 100
57 ms584 KiB
#include<iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <string> #include "combo.h" using namespace std; string guess_sequence(int N){ string ans; for(int i = 1; i<=N; ++i){ string ans1 = ans; string ans2 = ans; ans1+='A'; ans2+='B'; //if(i == 1) cout<<ans1+ans2<<" "<<press(ans1+ans2)<<endl; int x = press(ans1+ans2); if(x > i){ i++; ans+="AB"; } else if(x == i){ if(press(ans1) == i) ans+='A'; else ans+='B'; } else{ ans1[i-1] ='X'; if(press(ans1) == i) ans+='X'; else ans+='Y'; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...