supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:39:3: error: 'answer' was not declared in this scope
39 | answer.push_back(row);
| ^~~~~~
supertrees.cpp:42:12: error: expected ';' before numeric constant
42 | for(int j 0; j < n; j++)
| ^ ~
| ;
supertrees.cpp:42:19: warning: for increment expression has no effect [-Wunused-value]
42 | for(int j 0; j < n; j++)
| ~~^~~
supertrees.cpp:42:22: error: expected ')' before ';' token
42 | for(int j 0; j < n; j++)
| ~ ^
| )
supertrees.cpp:42:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
42 | for(int j 0; j < n; j++)
| ^~~
supertrees.cpp:42:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
42 | for(int j 0; j < n; j++)
| ^
supertrees.cpp:41:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
41 | for(int i = 0; i < n; i++)
| ^~~
supertrees.cpp:42:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
42 | for(int j 0; j < n; j++)
| ^
supertrees.cpp:42:24: error: 'j' was not declared in this scope
supertrees.cpp:49:11: error: 'x' was not declared in this scope
49 | unite(x, y);
| ^
supertrees.cpp:49:14: error: 'y' was not declared in this scope
49 | unite(x, y);
| ^
supertrees.cpp:56:18: error: invalid operands of types 'void' and 'void' to binary 'operator=='
56 | if((get_anc(i)==get_anc(j) && p[i][j]!=1 )||(get_anc(i)!=get_anc(j) && p[i][j]==1 ))
| ~~~~~~~~~~^~~~~~~~~~~~
| | |
| void void
supertrees.cpp:56:59: error: invalid operands of types 'void' and 'void' to binary 'operator!='
56 | if((get_anc(i)==get_anc(j) && p[i][j]!=1 )||(get_anc(i)!=get_anc(j) && p[i][j]==1 ))
| ~~~~~~~~~~^~~~~~~~~~~~
| | |
| void void
supertrees.cpp:64:3: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
64 | vector<int>v;
| ^~~~~~
| std::vector
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:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
supertrees.cpp:64:10: error: expected primary-expression before 'int'
64 | vector<int>v;
| ^~~
supertrees.cpp:68:5: error: 'v' was not declared in this scope
68 | v.push_back(j);
| ^
supertrees.cpp:70:28: error: 'v' was not declared in this scope
70 | for(int j = 0; j < (int)(v.size())-1; j++)
| ^
supertrees.cpp:76:14: error: expected primary-expression before ';' token
76 | for(int i = ; i < n; i++)
| ^
supertrees.cpp:84:34: error: invalid use of void expression
84 | unite1(get_anc(i), get_anc(j));
| ^
supertrees.cpp:90:3: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
90 | vector<int>v;
| ^~~~~~
| std::vector
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:386:11: note: 'std::vector' declared here
386 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
supertrees.cpp:90:10: error: expected primary-expression before 'int'
90 | vector<int>v;
| ^~~
supertrees.cpp:94:5: error: 'v' was not declared in this scope
94 | v.push_back(j);
| ^
supertrees.cpp:96:28: error: 'v' was not declared in this scope
96 | for(int j = 0; j < (int)(v.size())-1; j++)
| ^
supertrees.cpp:101:6: error: 'v' was not declared in this scope
101 | if(v.size() == 2)
| ^
supertrees.cpp:103:7: error: 'v' was not declared in this scope
103 | ans[v[0]][v[n-1]]=1;
| ^