Submission #1007018

#TimeUsernameProblemLanguageResultExecution timeMemory
1007018christinelynnCombo (IOI18_combo)C++17
5 / 100
2 ms352 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { vector<char> c = {'A', 'B', 'X', 'Y'}; string s; if (n == 1) { s = "."; for (auto &i : c) { s[0] = i; if (press(s) == n) { break; } } } else if (n == 2) { s = ".."; for (auto &i : c) { for (auto &j : c) { s[0] = i; s[1] = j; if (press(s) == n) { goto done; } } } } else { s = "..."; for (auto &i : c) { for (auto &j : c) { for (auto &k : c) { s[0] = i; s[1] = j; s[2] = k; if (press(s) == n) { goto done; } } } } } done: return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...