| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1339853 | chry | 콤보 (IOI18_combo) | C++20 | 17 ms | 788 KiB |
#include <bits/stdc++.h>
using namespace std;
char choices[4] = {'A', 'B', 'X', 'Y'};
int press(string p);
string guess_sequence(int N) {
string S = "";
function<bool(int)> dfs = [&](int now) -> bool {
for (int i = 0; i < 4; i++) {
if ((!S.empty()) && choices[i] == S[0]) continue;
int pp = press(S+choices[i]);
if (pp != N && pp > now) {
S += choices[i];
if (dfs(now+1)) return true;
S.pop_back();
} else if (pp == N) {
S += choices[i];
return true;
}
}
return false;
};
dfs(0);
return S;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
