| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1324400 | riafhasan2010 | Combo (IOI18_combo) | C++17 | 1 ms | 388 KiB |
#include "combo.h"
using namespace std;
std::string guess_sequence(int N) {
string alpha, p = "";
if (press("A")) p += 'A', alpha = "BXY";
else if (press("B")) p += 'B', alpha = "AXY";
else if (press("X")) p += 'X', alpha = "ABY";
else p += 'Y', alpha = "ABX";
for (int i = 0; i < N; i++) {
p += p[0];
for (int j = 0; j < 2; j++) {
p[i] = alpha[j];
if (press(p) == i + 1) {
break;
}
p[i] = alpha[2];
}
}
return p;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
