# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992143 | spycoderyt | Combo (IOI18_combo) | C++17 | 0 ms | 0 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 "combo.h"
#include <bits/stdc++.h>
using namespace std;
std::string guess_sequence(int N) {
vector<char> v = {'A','B','X','Y'};
string p = "",tmp;
int cur=0;
for(int i = 0;i<N;i++) {
int ch = 0;
for(int k = 0;k<4;k++) {
tmp = p + v[k];
int res = press(tmp);
if(res>cur){
cur = res;
p = tmp;
ch = 1;
break;
}
}
if(!ch)return p;
}
return S;
}