Submission #569917

#TimeUsernameProblemLanguageResultExecution timeMemory
569917EdilRoad Closures (APIO21_roads)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
vector <int> minimum_closure_costs(int n, int u[], int v[], int w[])
{
    vector <int> ans;
    int sm = 0;
    for(int i = 0; i < n-1; i++)
    {
        sm += w[i];
        ans.push_back(sm);
    }
    reverse(ans.begin(), ans.end());
    ans.push_back(0);
    return ans;
}

Compilation message (stderr)

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