Submission #1085033

#TimeUsernameProblemLanguageResultExecution timeMemory
1085033StaheosCombo (IOI18_combo)C++14
10 / 100
43 ms1212 KiB
#include <string> #include "combo.h" #include <iostream> using namespace std; string guess_sequence(int N) { int ab = press("AB"); char first; if (ab > 0) { if (press("A") > 0) { first = 'A'; } else { first = 'B'; } } else { if (press("X") > 0) { first = 'X'; } else { first = 'Y'; } } string p = ""; p += first; for (int i = 1; i < N; i++) { int m; p = p + 'A'; if (first != 'A') { m = press(p); if (m > i) { continue; } } if (first != 'B') { p[i] = 'B'; m = press(p); if (m > i) { continue; } } if (first != 'X') { p[i] = 'X'; m = press(p); if (m > i) { continue; } } p[i] = 'Y'; } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...