Submission #588916

#TimeUsernameProblemLanguageResultExecution timeMemory
588916MahtimursuCombo (IOI18_combo)C++17
30 / 100
60 ms536 KiB
#include "combo.h" using namespace std; char opt[] = {'A', 'B', 'X', 'Y'}; string guess_sequence(int N) { string p = ""; while ((int)p.length() < N) { int tre = 0; bool ok = 0; for (char c : opt) { if (p.length() > 0 && c == p[0]) continue; if (ok || press(p + c) == (int)p.length() + 1) { p += c; break; } else tre++; if (p.length() > 0 && tre == 2) ok = 1; if (p.length() == 0 && tre == 3) ok = 1; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...