제출 #1311892

#제출 시각아이디문제언어결과실행 시간메모리
1311892eri16나일강 (IOI24_nile)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; vector<ll> calculate_costs1(vector<int> W, vector<int> A, vector<int> B, vector<int> E){ vector <ll> ans; vector <int> weight; ll sum=0LL; for (int i=0; i<A.size(); i++){ weight.push_back(A[i]-B[i]); sum+=B[i]; } sort(weight.begin(),weight.end()); if (weight.size()%2)sum+=weight[0]; for (int i=0; i<E.size(); i++){ ans.push_back(sum); } return ans; }

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

/usr/bin/ld: /tmp/ccjRVqmW.o: in function `main':
grader.cpp:(.text.startup+0x2ff): undefined reference to `calculate_costs(std::vector<int, std::allocator<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