Submission #510150

#TimeUsernameProblemLanguageResultExecution timeMemory
510150tabrCombo (IOI18_combo)C++17
0 / 100
0 ms200 KiB
#include <bits/stdc++.h> using namespace std; #ifdef tabr #include "library/debug.cpp" #else #define debug(...) #endif int press(string); string guess_sequence(int n) { string t = "ABXY"; int id = 0; if (press("XY")) { id |= 2; } if (press("BY")) { id |= 1; } string res = t.substr(id, 1); t.erase(t.begin() + id); for (int i = 1; i < n - 1; i++) { res += t[press(res + t[1] + res + t[2] + t[0] + res + t[2] + t[1] + res + t[2] + t[2])]; } if (press(res + t[0])) { res += t[0]; } else if (press(res + t[1])) { res += t[1]; } else { res += t[2]; } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...