Submission #349523

#TimeUsernameProblemLanguageResultExecution timeMemory
349523David_MCombo (IOI18_combo)C++14
100 / 100
56 ms508 KiB
#include "combo.h" #include <string> #define p press #define r return std::string e,a="AAABXY";std::string guess_sequence(int N){e=a[!!p("XY")*2+!!p("BY")+2];a[e[0]%21]='A';if(!--N)r e;for(int i=1;i<N;i++)e+=a[p(e+a[4]+e+a[5]+a[3]+e+a[5]+a[4]+e+a[5]+a[5])-i+3];if(p(e+a[3])>N)r e+a[3];if(p(e+a[4])>N)r e+a[4];r e+a[5];}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...