Submission #1132237

#TimeUsernameProblemLanguageResultExecution timeMemory
1132237finalventureCombo (IOI18_combo)C++17
10 / 100
14 ms456 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N) { string ret; vector<char> valid; if (press("AB")) { if (press("A")) { ret += 'A'; valid = {'B', 'X', 'Y'}; } else { ret += 'B'; valid = {'A', 'X', 'Y'}; } } else { if (press("X")) { ret += 'X'; valid = {'A', 'B', 'Y'}; } else { ret += 'Y'; valid = {'A', 'B', 'X'}; } } // int curr = 2; for (int i = 1; i < N; ++i) { ret += '.'; for (char c : valid) { ret[i] = c; if (press(ret) == i + 1) break; } } return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...