제출 #104685

#제출 시각아이디문제언어결과실행 시간메모리
104685promota전선 연결 (IOI17_wiring)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #define ll long long int using namespace std; ll min_total_length(int n,int m,int r[],int b[]){ ll minLen=0; for(int j=0;j<n-1;j++){ minLen += b[0]-r[j]; } for(int i=1;i<m;i++){ minLen += b[i]-r[n-1]; } return minLen; } int main() { int n,m; cin>>n>>m; int r[n],b[m]; for(int i=0;i<n;i++){ cin>>r[i]; } for(int i=0;i<n;i++){ cin>>b[i]; } cout<<min_total_length(n,m,r,b); return 0; }

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

/tmp/ccej1aJ2.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc09wLoD.o:wiring.cpp:(.text.startup+0x0): first defined here
/tmp/ccej1aJ2.o: In function `main':
grader.cpp:(.text.startup+0x23b): undefined reference to `min_total_length(std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status