# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
713112 | tht2005 | Combo (IOI18_combo) | C++17 | 62 ms | 616 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 tmp[100];
int solve(int l, int r) {
if(l == r) {
return l;
}
int m = (l + r) >> 1;
string combo;
for(int i = m + 1; i <= r; ++i) {
for(char ch : tmp[i]) {
combo.push_back(ch);
}
}
if(press(combo) >= (int)tmp[0].size()) {
return solve(m + 1, r);
}
return solve(l, m);
}
string guess_sequence(int N) {
string BUTTONS = "ABXY";
for(int i = 0; i < 4; ++i) {
tmp[i] = BUTTONS[i];
}
int first_button = solve(0, 3);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |