# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1126793 | m0vlan | Combo (IOI18_combo) | C++20 | 19 ms | 448 KiB |
#include "combo.h"
#include <set>
std::string guess_sequence(int N) {
std::string p="";
std::set<char>st={'A','X','B','Y'};
for (char i:st) {
if (press(p+i)==1) {
p+=i;
st.erase(i);
break;
}
}
while (p.size()<N) {
for (char i:st) {
if (press(p+i)==p.size()+1) {
p+=i;
break;
}
}
}
return p;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |