제출 #1240716

#제출 시각아이디문제언어결과실행 시간메모리
1240716happydavid말 (IOI15_horses)C++20
컴파일 에러
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; }

컴파일 시 표준 에러 (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