Submission #379824

#TimeUsernameProblemLanguageResultExecution timeMemory
379824SuhaibSawalha1Combo (IOI18_combo)C++14
30 / 100
77 ms560 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; vector<char> ca {'A', 'B', 'X', 'Y'}; string guess_sequence (int n) { string ans; for (int i = 0; i < 4; ++i) { if (i == 3 || press(ans + ca[i])) { ans += ca[i]; ca.erase(ca.begin() + i); break; } } for (int i = 1; i < n; ++i) { for (int j = 0; j < 3; ++j) { if (j == 2 || press(ans + ca[j]) == i + 1) { ans += ca[j]; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...