answer.code: In function ‘void solve()’:
answer.code:13:41: error: could not convert ‘{{0, 0}}’ from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 2> >’
13 | vector<array<int, 2>> pos = { {0,0} };
| ^
| |
| <brace-enclosed initializer list>
answer.code:16:22: error: no matching function for call to ‘std::vector<std::array<int, 2> >::push_back(<brace-enclosed initializer list>)’
16 | pos.push_back({ cur,cur + 1 });
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:66,
from answer.code:2:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’
1278 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 2> >::value_type&’ {aka ‘const std::array<int, 2>&’}
1278 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’
1295 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 2> >::value_type&&’ {aka ‘std::array<int, 2>&&’}
1295 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
answer.code:19:41: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type’ {aka ‘std::array<int, 2>’} and ‘int’)
19 | side.push_back({ cur, pos[i][1] });
| ^
answer.code:19:27: error: no matching function for call to ‘std::vector<std::array<int, 2> >::push_back(<brace-enclosed initializer list>)’
19 | side.push_back({ cur, pos[i][1] });
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’
1278 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 2> >::value_type&’ {aka ‘const std::array<int, 2>&’}
1278 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’
1295 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::array<int, 2> >::value_type&&’ {aka ‘std::array<int, 2>&&’}
1295 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
answer.code:22:44: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::array<int, 2> >, std::array<int, 2> >::value_type’ {aka ‘std::array<int, 2>’} and ‘int’)
22 | side.push_back({ cur + 1,pos[i][0] });
| ^
answer.code:22:27: error: no matching function for call to ‘std::vector<std::array<int, 2> >::push_back(<brace-enclosed initializer list>)’
22 | side.push_back({ cur + 1,pos[i][0] });
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; value_type = std::array<int, 2>]’
1278 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note: no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::array<int, 2> >::value_type&’ {aka ‘const std::array<int, 2>&’}
1278 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/st...