제출 #1082744

#제출 시각아이디문제언어결과실행 시간메모리
1082744blackslex도로 폐쇄 (APIO21_roads)C++17
컴파일 에러
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; }

컴파일 시 표준 에러 (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