Submission #980386

#TimeUsernameProblemLanguageResultExecution timeMemory
980386janson0109Combo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include <combo.h>
using namespace std;

string guess_sequence(int N) {
    string p = "";
    string pos;
    if(press("AB") >= 1) {
        if(press("A") == 1) {
            p += "A";
            pos = "BXY";
        } else {
            p += "B";
            pos = "AXY";
        }
    } else {
        if(press("X") == 1) {
            p += "X";
            pos = "ABY";
        } else {
            p += "Y";
            pos = "ABX";
        }
    }
    for(int i=1; i<N-1; i++) {
        string guess = p + pos[0] + pos[0] + p + pos[0] + pos[1] + p + pos[0] + pos[2] + p + pos[1];
        switch(press(guess)) {
            case 0:
                p += pos[2];
                break;
            case 1:
                p += pos[1];
                break;
            case 2:
                p += pos[0];
                break;
        }
    }
    if(press(p + "A" + p + "B") >= 1) {
        if(press(p + "A") == 1) {
            p += "A";
        } else {
            p += "B";
        }
    } else {
        if(press(p + "X") == 1) {
            p += "X";
        } else {
            p += "Y";
        }
    }
    return p;
}

int main() {
    return 0;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccqSVH3w.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccb0y7Gy.o:combo.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status