Submission #1132231

#TimeUsernameProblemLanguageResultExecution timeMemory
1132231finalventureCombo (IOI18_combo)C++17
0 / 100
0 ms408 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...