제출 #1011329

#제출 시각아이디문제언어결과실행 시간메모리
1011329nisanduuHorses (IOI15_horses)C++14
컴파일 에러
0 ms0 KiB
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <bits/stdc++.h> using namespace std; typedef long long ll; ll N = 1e5 + 10; vector<ll> a,b; ll mod = 1e9 + 7; ll init(ll n,vector<ll> X,vector<ll> Y){ a=X; b=Y; N=n; ll ans = 0; ll cr = 1; for(ll i=0;i<n;i++){ cr *= a[i]; cr %= mod; ans = max(ans,(cr*b[i])%mod); } return ans; } ll updateX(ll pos,ll val){ a[pos]=val; return 0; } ll updateY(ll pos,ll val){ b[pos]=val; return 0; } // int main() // { // cout<<init(3,{2,1,3},{3,2,1})<<endl; // return 0; // }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/cc75yT0Z.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