supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:60:24: error: no matching function for call to 'std::vector<std::vector<int> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
60 | roots.pb(trees.bk.bk);
| ^
In file included from /usr/include/c++/9/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/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 '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka '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: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::value_type = std::vector<int>]'
1200 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1200:30: note: no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} to 'std::vector<std::vector<int> >::value_type&&' {aka 'std::vector<int>&&'}
1200 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
supertrees.cpp:65:23: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<int> >' and 'std::vector<int>')
65 | for (auto j:sz(trees[i]))
| ^
supertrees.cpp:6:21: note: in definition of macro 'sz'
6 | #define sz(x) (int)(x).size()
| ^
In file included from /usr/include/c++/9/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::reference = std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1058:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::const_reference = const std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1058:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
supertrees.cpp:67:7: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<int> >' and 'std::vector<int>')
67 | ans[i][j]=1;
| ^
In file included from /usr/include/c++/9/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::reference = std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1058:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::const_reference = const std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1058:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
supertrees.cpp:75:9: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<int> >' and 'std::vector<int>')
75 | if (p[i][j]==2)adjcycl[i].pb(j);
| ^
In file included from /usr/include/c++/9/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::reference = std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1058:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::const_reference = const std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1058:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
supertrees.cpp:75:26: error: no match for 'operator[]' (operand types are 'std::vector<std::vector<int> >' and 'std::vector<int>')
75 | if (p[i][j]==2)adjcycl[i].pb(j);
| ^
In file included from /usr/include/c++/9/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1040:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::reference = std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1040:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1040 | operator[](size_type __n) _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_vector.h:1058:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; std::vector<_Tp, _Alloc>::const_reference = const std::vector<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1058:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'}
1058 | operator[](size_type __n) const _GLIBCXX_NOEXCEPT
| ~~~~~~~~~~^~~
supertrees.cpp:81:11: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::vector<int>')
81 | if (!vis[i])
| ^
In file included from /usr/include/c++/9/vector:68,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/9/bits/stl_bvector.h:886:7: note: candidate: 'std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::_Bit_reference; std::vector<bool, _Alloc>::size_type = long unsigned int]'
886 | operator[](size_type __n)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:886:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
886 | operator[](size_type __n)
| ~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_bvector.h:893:7: note: candidate: 'std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]'
893 | operator[](size_type __n) const
| ^~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:893:28: note: no known conversion for argument 1 from 'std::vector<int>' to 'std::vector<bool>::size_type' {aka 'long unsigned int'}
893 | operator[](size_type __n) const
| ~~~~~~~~~~^~~
supertrees.cpp:83:30: error: cannot convert 'std::vector<int>' to 'int'
83 | vi v=get_comp(adjcycl,vis,i);
| ^
| |
| std::vector<int>
supertrees.cpp:21:51: note: initializing argument 3 of 'vi get_comp(std::vector<std::vector<int> >&, std::vector<bool>&, int)'
21 | vi get_comp(vector<vi>& adj,vector<bool>& vis,int k)
| ~~~~^