Submission #232292

#TimeUsernameProblemLanguageResultExecution timeMemory
232292pere_gilCombo (IOI18_combo)C++14
10 / 100
86 ms548 KiB
#include "combo.h" #include <iostream> using namespace std; std::string guess_sequence(int N){ string s=""; string re=""; if(press("A")==1){ s+="A"; re="BXY"; } else if(press("B")==1){ s+="B"; re="AXY"; } else if(press("X")==1){ s+="X"; re="ABY"; } else if(press("Y")==1){ s+="Y"; re="ABX"; } for(int i=1;i<N;i++){ if(press(s+re[0])==i+1){ s+=re[0]; } else if(press(s+re[1])==i+1){ s+=re[1]; } else if(press(s+re[2])==i+1){ s+=re[2]; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...