supertrees.cpp:13:17: error: types may not be defined in alias template declarations
13 | struct UnionFind{
| ^
supertrees.cpp:15:2: error: 'matrix' does not name a type
15 | matrix<int> group;
| ^~~~~~
supertrees.cpp:11:15: error: two or more data types in declaration of 'type name'
11 | using matrix= vector<vector<T>>
| ^~~~~~~~~~~~~~~~~
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:44:2: error: 'matrix' was not declared in this scope
44 | matrix<int> resp(n,vector<int>(n));
| ^~~~~~
supertrees.cpp:44:9: error: expected primary-expression before 'int'
44 | matrix<int> resp(n,vector<int>(n));
| ^~~
supertrees.cpp:46:23: error: class template argument deduction failed:
46 | UnionFind connected(n);
| ^
supertrees.cpp:46:23: error: no matching function for call to 'UnionFind(int&)'
supertrees.cpp:18:2: note: candidate: 'template<class T> UnionFind(int)-> UnionFind<T>'
18 | UnionFind(int sz = 0){
| ^~~~~~~~~
supertrees.cpp:18:2: note: template argument deduction/substitution failed:
supertrees.cpp:46:23: note: couldn't deduce template parameter 'T'
46 | UnionFind connected(n);
| ^
supertrees.cpp:13:8: note: candidate: 'template<class T> UnionFind(UnionFind<T>)-> UnionFind<T>'
13 | struct UnionFind{
| ^~~~~~~~~
supertrees.cpp:13:8: note: template argument deduction/substitution failed:
supertrees.cpp:46:23: note: mismatched types 'UnionFind<T>' and 'int'
46 | UnionFind connected(n);
| ^
supertrees.cpp: In lambda function:
supertrees.cpp:64:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for(int i = 1; i < g.size(); i++){
| ~~^~~~~~~~~~
supertrees.cpp:65:5: error: 'resp' was not declared in this scope
65 | resp[g[i-1]][g[i]] = 1;
| ^~~~
supertrees.cpp:95:4: error: expected primary-expression before '}' token
95 | }
| ^
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:101:2: error: expected ',' or ';' before 'bool'
101 | bool ok = 1;
| ^~~~
supertrees.cpp:104:4: error: 'ok' was not declared in this scope
104 | ok&=solveforgroup(i);
| ^~
supertrees.cpp:106:6: error: 'ok' was not declared in this scope
106 | if(!ok)
| ^~
supertrees.cpp:108:8: error: 'resp' was not declared in this scope
108 | build(resp);
| ^~~~