# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
349502 | 2021-01-17T16:57:04 Z | David_M | Combo (IOI18_combo) | C++14 | 0 ms | 0 KB |
#include "combo.h" #include <bits/stdc++.h> #define p press #define r return std::string e,a="BXY"; std::string guess_sequence(int N){ p("XY")?ans='Y'-p("X"):ans='B'-p("A"); if(N==1)r ans; if(ans!="A")a[(ans[0]-'B')%21]='A'; for(int i=1;i<N-1;i++)e+=a[p(e+a[1]+e+a[2]+a[0]+e+a[2]+a[1]+e+a[2]+a[2])-i]; if(p(ans+a[0])==N)r e+a[0]; if(p(ans+a[1])==N)r e+a[1]; r e+a[2]; }