Submission #1042186

#TimeUsernameProblemLanguageResultExecution timeMemory
1042186blackslexCombo (IOI18_combo)C++17
10 / 100
33 ms944 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { string s = ""; vector<char> c{'A', 'B', 'X', 'Y'}; for (auto &e: c) { string p; p.push_back(e); if (press(p)) {s = p; break;} } for (int i = 2; i <= N; i++) { for (auto &e: c) { if (e != s.front()) { string p = s; p.push_back(e); if (press(p) == i) {s = p; break;} } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...