Submission #1311892

#TimeUsernameProblemLanguageResultExecution timeMemory
1311892eri16Nile (IOI24_nile)C++20
Compilation error
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; }

Compilation message (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