Submission #552270

#TimeUsernameProblemLanguageResultExecution timeMemory
552270lethinh05Combo (IOI18_combo)C++11
Compilation error
0 ms0 KiB
string guess_sequence(int n) {
    string s = "";
    fto(i, 0, 3) {
        string p(1, chrs[i]);
        int matches = press(p);
        if (matches == 1) {
            s += chrs[i];
            break;
        }
    }

    fto(i, 1, n-1) {
        fto(i, 0, 3) {
            string p = s + chrs[i];
            int matches = press(p);
            if (matches == sz(p)) {
                s += chrs[i];
                break;
            }
        }
    }

    return s;
}

Compilation message (stderr)

combo.cpp:1:1: error: 'string' does not name a type
    1 | string guess_sequence(int n) {
      | ^~~~~~