Submission #626963

#TimeUsernameProblemLanguageResultExecution timeMemory
626963GloryRoad Closures (APIO21_roads)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define int long long #define vi vector<int> using namespace std; vi minimum_closure_costs(int N,vi U,vi V,vi W){ vi ans(N+100,0); int res = 0; for(int i=0; i< N; i++){ res+= W[i]; } sort(W.begin(),W.end(),greater<int>()); ans[0]=res; for(int i=1; i< N; i++){ res-=W[i-1]; ans[i]=res; } return ans; }

Compilation message (stderr)

/usr/bin/ld: /tmp/cch2rnNL.o: in function `main':
grader.cpp:(.text.startup+0x277): undefined reference to `minimum_closure_costs(int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status