제출 #309625

#제출 시각아이디문제언어결과실행 시간메모리
309625Genius1506콤보 (IOI18_combo)C++14
5 / 100
1 ms228 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n){ string ans; char a='A',b='B',c='X'; if(press("AB")){ if(press("A")){ ans="A"; a='Y'; } else{ ans="B"; b='Y'; } } else{ if(press("X")){ ans="X"; c='Y'; } else{ ans="Y"; } } for(int i = 2; i < n; i++){ int chu = press(ans+a+ans+b+a+ans+b+b+ans+b+c); if(chu==i) ans+=a; else if(chu==i+1) ans+=b; else ans+=c; } if(press(ans+a)==n) ans+=a; else if(press(ans+b)==n) ans+=b; else ans+=c; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...