foo.cc:32:11: error: expected identifier before '(' token
32 | void union(int a,int b){
| ^
foo.cc:32:12: error: expected unqualified-id before 'int'
32 | void union(int a,int b){
| ^~~
foo.cc:32:12: error: expected ')' before 'int'
32 | void union(int a,int b){
| ~^~~
| )
foo.cc: In function 'int main()':
foo.cc:58:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Node>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | while(k<a.size()&&a[k].h>b[i].h){
| ~^~~~~~~~~
foo.cc:65:18: error: expected primary-expression before 'union'
65 | if(vis[id2])union(id1,id2);
| ^~~~~
[Hydro](https://hydro.ac)提供评测服务