| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 998580 | toast12 | Combo (IOI18_combo) | C++14 | 45 ms | 344 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;
string guess_sequence(int N) {
string ans = "";
ans += 'A';
int x = press(ans);
vector<char> poss;
if (x)
poss = {'B', 'X', 'Y'};
else {
ans[0] = 'B';
x = press(ans);
if (x)
poss = {'A', 'X', 'Y'};
else {
ans[0] = 'X';
x = press(ans);
if (x)
poss = {'A', 'B', 'Y'};
else
poss = {'A', 'B', 'X'};
}
}
while ((int)ans.size() < N) {
for (char c : poss) {
string s = ans;
s += c;
x = press(s);
if (x > (int)ans.size()) {
ans = s;
break;
}
}
}
return ans;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
