# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
849477 | Bach21 | 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;
#define int long long
const int m=4;
string gue="ABXY";
string guess_sequence(int N) {
int len[N];
string s="";
string tmp="";
int cnt=0;
for (int i=0;i<N;i++) {
for (int trie = 0; trie < gue.size(); trie++) {
tmp = s;
tmp += gue[trie];
cnt = press(tmp);
if (cnt > s.size()) {
s+=gue[trie];
if (i==0) gue.erase(gue.begin()+trie);
break;
}
}
}
return s;
}