Submission #370856

#TimeUsernameProblemLanguageResultExecution timeMemory
370856rc_catuntaCombo (IOI18_combo)C++14
10 / 100
74 ms404 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { string p = ""; string S = ""; string patron = "ABXY"; if(press("A")) S="A"; else if(press("B")) S="B"; else if(press("X")) S="X"; else S="Y"; char primera_letra=S[0]; for(int i=2;i<=N;i++){ //Recorremos el patron for(int j=0;j<4;j++){ if(patron[j]!=primera_letra){ if(press(S+patron[j])==i){ S=S+patron[j]; break; } } } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...