제출 #431388

#제출 시각아이디문제언어결과실행 시간메모리
431388Bench0310콤보 (IOI18_combo)C++17
0 / 100
1 ms200 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; typedef long long ll; string guess_sequence(int n) { string res; int t=press("AB"); if(t==1) res+="BA"[press("A")]; else res+="YX"[press("X")]; string opt=res; for(char c:"ABXY") if(c!=res[0]) opt+=c; for(int i=2;i<=n-1;i++) { string now; now+=res; now+=opt[1]; for(int j=1;j<=3;j++) now+=(res+opt[2]+opt[j]); t=press(now); if(t==i-1) res+=opt[3]; else if(t==i) res+=opt[1]; else res+=opt[2]; } for(int j=1;j<=3;j++) { if(j==3||press(res+opt[j])==n) { res+=opt[j]; break; } } return res; } //int main() //{ // // return 0; //}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...