# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1020651 | khome | Combo (IOI18_combo) | C++14 | 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>
#include "combo.h"
using namespace std;
string guess_sequence(long long N) {
vector<string> a;
a={"A", "B", "X", "Y"};
// cout << N << "\n";
string res, per = "";
while (res.size()!=N){
for (string i : a){
if (per != i && press(res+i) == (res+i).size()){
// cout << press(res+i) << ' ' << res+i << "\n";
if (per == "") per = i;
res += i;
}
}
}
// cout << res << "\n";
return res;
}