# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
899530 | SuPythony | 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;
string guess_sequence(int n) {
vector<string> c={"A","B","X","Y"};
string ans="";
for (int i=0; i<4; i++) {
if (press(c[i])) {
ans+=c[i];
c.erase(c.begin()+i);
break;
}
}
int l=1;
while (l<n) {
for (auto i: c) {
if (press(ans+i)>l) {
ans+=i;
l++;
}
}
}
return ans;
}