#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
const string c = "ABXY";
string guess_sequence(int N) {
string ret = "";
int cur_cnt = 0;
char st = c[0];
for (int i = 0; i < N; i++) {
for (int j = 0; j < 4; j++) {
if (i != 0) if (c[j] == st) continue;
string t = ret + c[j];
int cnt = press(t);
if (cnt > cur_cnt) {
if (i == 0) st = c[j];
ret.push_back(c[j]);
cur_cnt = cnt;
break;
}
}
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |