roads.cpp: In function 'void dfs(int, int)':
roads.cpp:21:16: error: 'i' was not declared in this scope
21 | dp[i][k] = ans;
| ^
roads.cpp:32:27: error: 'INF' was not declared in this scope
32 | dp[node][k] = INF;
| ^~~
roads.cpp: In function 'std::vector<long long int> minimum_closure_costs(int, std::vector<int>, std::vector<int>, std::vector<int>)':
roads.cpp:51:14: error: no matching function for call to 'std::vector<std::vector<long long int> >::assign(int, int)'
51 | dp.assign(n+1, 0);
| ~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from roads.h:1,
from roads.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:768:9: note: candidate: 'template<class _InputIterator, class> void std::vector<_Tp, _Alloc>::assign(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
768 | assign(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/11/bits/stl_vector.h:768:9: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/11/bits/stl_algobase.h:65,
from /usr/include/c++/11/vector:60,
from roads.h:1,
from roads.cpp:1:
/usr/include/c++/11/bits/stl_iterator_base_types.h: In substitution of 'template<class _InIter> using _RequireInputIter = std::__enable_if_t<std::is_convertible<typename std::iterator_traits< <template-parameter-1-1> >::iterator_category, std::input_iterator_tag>::value> [with _InIter = int]':
/usr/include/c++/11/bits/stl_vector.h:766:9: required from here
/usr/include/c++/11/bits/stl_iterator_base_types.h:249:11: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'
249 | using _RequireInputIter =
| ^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from roads.h:1,
from roads.cpp:1:
/usr/include/c++/11/bits/stl_vector.h:749:7: note: candidate: 'void std::vector<_Tp, _Alloc>::assign(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<long long int>]'
749 | assign(size_type __n, const value_type& __val)
| ^~~~~~
/usr/include/c++/11/bits/stl_vector.h:749:47: note: no known conversion for argument 2 from 'int' to 'const value_type&' {aka 'const std::vector<long long int>&'}
749 | assign(size_type __n, const value_type& __val)
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/11/bits/stl_vector.h:794:7: note: candidate: 'void std::vector<_Tp, _Alloc>::assign(std::initializer_list<_Tp>) [with _Tp = std::vector<long long int>; _Alloc = std::allocator<std::vector<long long int> >]'
794 | assign(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/11/bits/stl_vector.h:794:7: note: candidate expects 1 argument, 2 provided
roads.cpp:55:54: error: 'i' was not declared in this scope
55 | for (int k = 0; k <= n; k++) ans.push_back(dp[1][i]);
| ^