Problem car
User LimCheeHann
Submission Time 2026-04-27 17:07:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

car.cpp: In function ‘int main()’:
car.cpp:18:20: error: no matching function for call to ‘std::vector<std::vector<int> >::push_back(int&)’
18 | roads.push_back(i);
| ^
In file included from /usr/include/c++/9/vector:67,
from car.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:1184:7: note: candidate: ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::value_type = std::vector<int>]’
1184 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1184:35: note: no known conversion for argument 1 from ‘int’ to ‘const value_type&’ {aka ‘const std::vector<int>&’}
1184 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1200:7: note: c