worldmap.cpp:4:15: error: 'N' was not declared in this scope
4 | vector<int> v[N+1];
| ^
worldmap.cpp:5:1: error: ISO C++ forbids declaration of 'rec' with no type [-fpermissive]
5 | rec(int u, int w) {
| ^~~
worldmap.cpp: In function 'int rec(int, int)':
worldmap.cpp:7:24: error: 'v' was not declared in this scope
7 | for(int i = 0; i < v[w].size(); i++) {
| ^
worldmap.cpp:9:23: error: invalid types 'int[int]' for array subscript
9 | rec(w, v[w[i]]);
| ^
worldmap.cpp:10:30: error: invalid types 'int[int]' for array subscript
10 | ans.push_back(v[w[i]]);
| ^
worldmap.cpp:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
13 | }
| ^
worldmap.cpp: In function 'std::vector<std::vector<int> > create_map(int, int, std::vector<int>, std::vector<int>)':
worldmap.cpp:17:9: error: 'v' was not declared in this scope
17 | v[A[i]].push_back(B[i]);
| ^
worldmap.cpp:20:20: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int')
20 | ans = rec(0, 1);
| ^
In file included from /usr/include/c++/13/vector:72,
from /usr/include/c++/13/functional:64,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53,
from worldmap.cpp:1:
/usr/include/c++/13/bits/vector.tcc:210:5: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]'
210 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/vector.tcc:211:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<int>&'
211 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/13/vector:66:
/usr/include/c++/13/bits/stl_vector.h:766:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:766:26: note: no known conversion for argument 1 from 'int' to 'std::vector<int>&&'
766 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:788:7: note: candidate: 'constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]'
788 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:788:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
788 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~