# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1006693 | devariaota | 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;
#define all(x) x.begin(), x.end()
string guess_sequence(int n) {
string S = "ABXY";
for (char a = 0; a < 4; a++) for (char b = 0; b <4; b++) for (char c = 0; c < 4; c++) for (char d = 0; d < 4; d++) {
string res;
res += S[a] + S[b] + S[c] + S[d];
int x = press(res);
if (x == 4) {
cout << res;
return;
}
}
}
// string guess_sequence(int N) {
// string permu = "AAAABBBBXXXXYYYY";
// do {
// cout << permu << endl;
// } while (next_permutation(all(permu)));
// }