Submission #1271683

#TimeUsernameProblemLanguageResultExecution timeMemory
1271683kaoklaxdCombo (IOI18_combo)C++20
10 / 100
15 ms444 KiB
#include "combo.h" std::string guess_sequence(int N) { std::string p = ""; std::string temp = "ABXY"; std::string start = ""; int no; for(int i=0;i<4;i++){ std::string s = ""; s+=temp[i]; if(press(s)==1){ start+=temp[i]; no = i; break; } } for(int i=1;i<N;i++){ for(int j=0;j<4;j++){ if(j == no) continue; std::string temp2 = start; temp2+=temp[j]; if(press(temp2) == i+1){ start = temp2; break; } } } return start; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...