Submission #524206

#TimeUsernameProblemLanguageResultExecution timeMemory
524206daisyCombo (IOI18_combo)C++17
97 / 100
44 ms544 KiB
#include "combo.h" 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(N>1){ 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...