Submission #581348

#TimeUsernameProblemLanguageResultExecution timeMemory
581348dvdg6566Combo (IOI18_combo)C++14
10 / 100
99 ms548 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;

const char BUTTONS[] = "ABXY";

string guess_sequence(int N) {
    string s;
    for (int i = 0; i < N; i++) {
        char c;
        for (int j = 0; j < 4; j++) {
            if (press(s + BUTTONS[j]) == i + 1) c = BUTTONS[j];
        }
        s += c;
    }
    return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...