Submission #420971

#TimeUsernameProblemLanguageResultExecution timeMemory
420971MonchitoComparing Plants (IOI20_plants)C++14
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
using namespace std;

int K, N;
vector<int> R;

void init(int k, vector<int> r){
    K = k;
    R = r;
    N = (int)r.size();
}

int compare_plants(int x, int y){
    if((x+1)%N == y)
        return (R[x] == 1)? -1 : 1; 
    
    if((y+1)%N == x)
        return (R[y] == 1)? 1 : -1;
    
    return 0;
}

int main(){
    // marico el que lo lea

    return 0;
}

Compilation message (stderr)

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