# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1008451 | nickolasarapidis | Combo (IOI18_combo) | C++17 | 1 ms | 344 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "combo.h"
using namespace std;
string guess_sequence(int N){
string S;
char first;
char buttons[4] = {'A', 'B', 'X', 'Y'};
for(int i = 0; i < 4; i++){
if(press("" + buttons[i]) > 0){
S.push_back(buttons[i]);
first = buttons[i];
break;
}
}
for(int i = 0; i < 4; i++){
if(buttons[i] != first and press(S + buttons[i]) > 0){
S += buttons[i];
if(S.size() < 3){
i = 0;
}
}
}
return S;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |