pipes.cpp:11:21: error: expected identifier before numeric constant
vector<int> par(100001);
^~~~~~
pipes.cpp:11:21: error: expected ',' or '...' before numeric constant
pipes.cpp: In constructor 'UNION_FIND::UNION_FIND()':
pipes.cpp:12:51: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
UNION_FIND(){for(int i=1; i<=100000; i++)par[i]=i;}
^
pipes.cpp: In member function 'int UNION_FIND::findpar(int)':
pipes.cpp:13:45: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
int findpar(int num){return num==par[num]?num:par[num]=findpar(par[num]);}
^
pipes.cpp:13:58: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
int findpar(int num){return num==par[num]?num:par[num]=findpar(par[num]);}
^
pipes.cpp:13:75: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
int findpar(int num){return num==par[num]?num:par[num]=findpar(par[num]);}
^
pipes.cpp: In member function 'void UNION_FIND::mergepar(int, int)':
pipes.cpp:14:47: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
void mergepar(int a, int b){par[findpar(a)]=findpar(b);}
^
pipes.cpp: In function 'void dfs(int)':
pipes.cpp:24:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<link[u].size(); i++){
~^~~~~~~~~~~~~~~
pipes.cpp: In function 'int main()':
pipes.cpp:54:31: error: invalid use of non-static member function 'std::vector<int> UNION_FIND::par(int)'
vector<int>().swap(uf1.par);
^
pipes.cpp:11:17: note: declared here
vector<int> par(100001);
^~~
pipes.cpp:55:31: error: invalid use of non-static member function 'std::vector<int> UNION_FIND::par(int)'
vector<int>().swap(uf2.par);
^
pipes.cpp:11:17: note: declared here
vector<int> par(100001);
^~~
pipes.cpp:39:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
pipes.cpp:42:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~~