# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1263463 | piolk | Combo (IOI18_combo) | C++20 | 14 ms | 456 KiB |
#include <bits/stdc++.h>
using namespace std;
vector<char> buttons={'A','B','X','Y'};
int press(string p);
string guess_sequence(int N){
string soFar="";
while (soFar.size()<N){
for (int i=0;i<4;i++){
if (buttons[i]==soFar[0]) continue;
if (press(soFar+buttons[i])>soFar.size()){
soFar.push_back(buttons[i]);
break;
}
}
}
return soFar;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |