# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
480316 | omg | 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<bits/stdc++.h>
using namespace std;
void loop(string R, int combo) {
R.push_back('A');
if (press(R) > combo) return;
R.pop_back();
R.push_back('B');
if (press(R) > combo) return;
R.pop_back();
R.push_back('X');
if (press(R) > combo) return;
R.pop_back();
R.push_back('Y');
if (press(R) > combo) return;
R.pop_back();
}
string guess_sequence(int N) {
string R="";
int comboCur=0;
for (int i=0;i<N;i++) {
loop(R, comboCur);
comboCur++;
}
cout<<R;
}