Submission #104683

#TimeUsernameProblemLanguageResultExecution timeMemory
104683promotaWiring (IOI17_wiring)C++14
Compilation error
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[]){ int 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; }

Compilation message (stderr)

/tmp/cciweLv6.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccD9B3d6.o:wiring.cpp:(.text.startup+0x0): first defined here
/tmp/cciweLv6.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