Submission #918764

#TimeUsernameProblemLanguageResultExecution timeMemory
918764AiperiiiHorses (IOI15_horses)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back #define all(x) x.begin(),x.end() const int mod=1e9+7; vector <int> x,y; int init(int N, int X[], int Y[]) { x.pb(0);y.pb(0); for(int i=0;i<N;i++){ x.pb(X[i]); y.pb(Y[i]); } int d=1; int mx=0; int n=x.size()-1; for(int i=1;i<=n;i++){ d*=x[i]; d%=mod; mx=max(mx,(d*y[i])%mod); } return mx%mod; } int updateX(int pos,int val){ pos++; x[pos]=val; int d=1; int mx=0; int n=x.size()-1; for(int i=1;i<=n;i++){ d*=x[i]; d%=mod; mx=max(mx,(d*y[i])%mod); } return mx%mod; } int updateY(int pos,int val){ pos++; y[pos]=val; int d=1; int mx=0; int n=y.size()-1; for(int i=1;i<=n;i++){ d*=x[i]; d%=mod; mx=max(mx,(d*y[i])%mod); } return mx%mod; }

Compilation message (stderr)

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