Submission #1240716

#TimeUsernameProblemLanguageResultExecution timeMemory
1240716happydavidHorses (IOI15_horses)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

const int MOD = 1000000007;

int init(int N, vector<int>& X, vector<int>& Y){
    vector<int> horses(N);
    for(int i =0; i < N; i++){
        if(i ==0 ){
            horses[i] = X[i];
        } else {
            horses[i] = (horses[i-1] * X[i]) % MOD;
        }
    }

    int ma = 0;
    for(int i =0; i < N; i++){
        ma = max(ma, horses[i] * Y[i]);
    }
    return ma;
}

int updateX(int pos, int val){
    pos = pos;
    val = val;
    return 0;
}

int updateY(int pos, int val){
    pos = pos;
    val = val;
    return 0;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccVXfrKL.o: in function `main':
grader.c:(.text.startup+0xb1): undefined reference to `init(int, int*, int*)'
collect2: error: ld returned 1 exit status