Submission #722427

#TimeUsernameProblemLanguageResultExecution timeMemory
722427grossly_overconfidentRoad Closures (APIO21_roads)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define endl '\n' //#define int long long //#define INT_MAX LONG_LONG_MAX vector<long long> minimum_closure_cost(int n, vector<int> u, vector<int> v, vector<int> w){ int op1 = 0, op2 = 0, total = 0; for (int i = 0; i < n; i += 2){ op1 += w[i]; } for (int i = 1; i < n; i += 2){ op2 += w[i]; } for (int i = 0; i < n; ++i){ total += w[i]; } vector<long long> out(n); out[0] = total; out[1] = min(op1, op2); return out; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccPgG9sC.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