supertrees.cpp:6:5: error: 'vector' does not name a type
6 | vector<int> parent, rank;
| ^~~~~~
supertrees.cpp: In constructor 'dsu::dsu(int)':
supertrees.cpp:11:9: error: 'rank' was not declared in this scope; did you mean 'std::rank'?
11 | rank.assign(size, 1);
| ^~~~
| std::rank
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: 'std::rank' declared here
1359 | struct rank
| ^~~~
supertrees.cpp:12:9: error: 'parent' was not declared in this scope
12 | parent.resize(size);
| ^~~~~~
supertrees.cpp: In member function 'int dsu::search(int)':
supertrees.cpp:16:17: error: 'parent' was not declared in this scope
16 | if(v == parent[v]) return v;
| ^~~~~~
supertrees.cpp:17:16: error: 'parent' was not declared in this scope
17 | return parent[v] = search(parent[v]);
| ^~~~~~
supertrees.cpp: In member function 'void dsu::connect(int, int)':
supertrees.cpp:23:12: error: 'rank' was not declared in this scope; did you mean 'std::rank'?
23 | if(rank[v]>=rank[u]) parent[u] = v;
| ^~~~
| std::rank
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: 'std::rank' declared here
1359 | struct rank
| ^~~~
supertrees.cpp:23:30: error: 'parent' was not declared in this scope
23 | if(rank[v]>=rank[u]) parent[u] = v;
| ^~~~~~
supertrees.cpp:24:14: error: 'parent' was not declared in this scope
24 | else parent[v] = u;
| ^~~~~~
supertrees.cpp:25:12: error: 'rank' was not declared in this scope; did you mean 'std::rank'?
25 | if(rank[v] == rank[u]) rank[v]++;
| ^~~~
| std::rank
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: 'std::rank' declared here
1359 | struct rank
| ^~~~
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:34:5: error: 'vector' was not declared in this scope
34 | vector<int> a[n];
| ^~~~~~
supertrees.cpp:34:5: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from supertrees.h:1,
from supertrees.cpp:1:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
supertrees.cpp:34:12: error: expected primary-expression before 'int'
34 | vector<int> a[n];
| ^~~
supertrees.cpp:42:9: error: 'a' was not declared in this scope
42 | a[d.search(i)].pb(i);
| ^
supertrees.cpp:45:12: error: 'a' was not declared in this scope
45 | if(a[i].size()<=1) continue;
| ^
supertrees.cpp:46:21: error: 'a' was not declared in this scope
46 | int pth = p[a[i][0]][a[i][1]];
| ^
supertrees.cpp:58:16: error: could not convert '(bool (*)[n])(& b)' from 'bool (*)[n]' to 'std::vector<std::vector<int> >'
58 | if(ctr) build(b);
| ^
| |
| bool (*)[n]