제출 #1056088

#제출 시각아이디문제언어결과실행 시간메모리
1056088KasymK도로 폐쇄 (APIO21_roads)C++17
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" using namespace std; #define ff first #define ss second #define all(v) v.begin(), v.end() #define ll long long #define pb push_back #define pii pair<int, int> #define wr puts("----------------") template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;} template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;} const int N = 1e5+5; ll F[N], par[N]; vector<ll> minimum_closure_costs(int n, vector<int> u, vector<int> v, vector<int> w){ sort(all(w)); vector<ll> A; ll sm = accumulate(all(w), 0ll); for(int k = 0; k < n; ++k){ A.pb(sm); sm -= w[n-k-2]; } return A; } int main(){ vector<ll> kk = minimum_closure_costs(5, {0, 0, 0, 0}, {1, 2, 3, 4}, {1, 4, 3, 2}); for(auto i : kk) printf("%lld ", i); puts(""); return 0; }

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

/usr/bin/ld: /tmp/cc2k66ZG.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc2vKBxJ.o:roads.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status