Submission #1187384

#TimeUsernameProblemLanguageResultExecution timeMemory
1187384nagorn_phCombo (IOI18_combo)C++20
0 / 100
0 ms408 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s = ""; string can = ""; int op = 0; if (press("AB")) { if (press("A")) { can = "BXY"; s += 'A'; } else { can = "AXY"; s += 'B'; } } else { if (press("X")) { can = "ABY"; s += 'X'; } else { can = "ABX"; s += 'Y'; } } for (int i = 1; i < n - 1; i++) { string curr = s + can[0] + s + can[1] + can[0] + s + can[1] + can[1] + s + can[1] + can[2]; op = press(curr); if (op == i) s += can[2]; else if (op == i + 1) s += can[0]; else if (op == i + 2) s += can[1]; } if (press(s + can[0])) s += can[0]; else if (press(s + can[1])) s += can[1]; else s += can[2]; return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...