Submission #1241564

#TimeUsernameProblemLanguageResultExecution timeMemory
1241564whatisdpCombo (IOI18_combo)C++17
30 / 100
10 ms456 KiB
#ifndef G #include "combo.h" #endif std::string cs[4] = {"A", "B", "X", "Y"}; std::string guess_sequence(int N) { using str = std::string; str s; for(int i=0;i<N;i++) { str z = s + cs[0] + s + cs[1]; int r = press(z); if (r > i) { int r2 = press(s + cs[0]); s += (r2 == i+1 ? cs[0] : cs[1]); } else if (r == i) { int r2 = press(s + cs[2]); s += (r2 == i+1 ? cs[2] : cs[3]); } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...