Submission #1082744

#TimeUsernameProblemLanguageResultExecution timeMemory
1082744blackslexRoad Closures (APIO21_roads)C++17
Compilation error
0 ms0 KiB
#include "roads.h" #include <vector> #include<bits/stdc++.h> using namespace std; using ll = long long; const int MxN = 25e4 + 5; ll dp[MxN][2]; vector<pii> v[MxN]; std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { int n = N, m = U.size(); ll res = 0; priority_queue<int> pq; for (int i = 0; i < m; i++) res += W[i], pq.emplace(W[i]); vector<ll> ans; for (int i = 0; i < n; i++) { ans.emplace_back(res); if (!pq.empty()) res -= pq.top(), pq.pop(); } return ans; }

Compilation message (stderr)

roads.cpp:10:8: error: 'pii' was not declared in this scope
   10 | vector<pii> v[MxN];
      |        ^~~
roads.cpp:10:11: error: template argument 1 is invalid
   10 | vector<pii> v[MxN];
      |           ^
roads.cpp:10:11: error: template argument 2 is invalid