| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1339883 | chry | 콤보 (IOI18_combo) | C++20 | 16 ms | 456 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 = "";
int now = 1;
int fst = 0;
if (press("AB") > 0) {
if (press("A") > 0) {
S += 'A';
fst = 0;
} else {
S += 'B';
fst = 1;
}
} else {
if (press("X") > 0) {
S += 'X';
fst = 2;
} else {
S += 'Y';
fst = 3;
}
}
while (now != N) {
for (int i = 0; i < 4; i++) {
if (i==fst) continue;
if (press(S+choices[i]) > now) {
now++;
S += choices[i];
continue;
}
}
}
return S;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
