Submission #728285

#TimeUsernameProblemLanguageResultExecution timeMemory
728285MBICombo (IOI18_combo)C++17
10 / 100
81 ms456 KiB
#include "combo.h" #include <iostream> using namespace std; string guess_sequence(int N) { int l=0; string p="A"; do { int k=press(p); if (k>l){ l=k; p+="A"; continue; } if (k==l){ if (p.back()=='A') p.back()='B'; else if (p.back()=='B') p.back()='X'; else p.back()='Y'; } } while (l<N); p.pop_back(); // cerr << p << " (ans)"; return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...