Submission #524204

#TimeUsernameProblemLanguageResultExecution timeMemory
524204daisyCombo (IOI18_combo)C++17
5 / 100
1 ms204 KiB
#include "combo.h" #include<string> std::string guess_sequence(int N) { std::string curr,r; int t; if(press("A")) {curr="A";r="BXY";} else if(press("B")) {curr="B";r="AXY";} else if(press("X")) {curr="X";r="ABY";} else {curr="Y";r="AXB";} for(int i=2;i<N;i++) { t=press(curr+r[0]+r[0]+curr+r[0]+r[1]+curr+r[0]+r[2]+curr+r[1]); if(t==i) curr+=r[1]; else if(t==i+1) curr+=r[0]; else curr+=r[2]; } if(press(curr+r[0])==N) curr+=r[0]; else if(press(curr+r[1])==N) curr+=r[1]; else curr+=r[2]; return curr; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...