swap.cpp:11:12: error: 'pait' was not declared in this scope
11 | pair<int , pait<int , int>> p[300000];
| ^~~~
swap.cpp:11:26: error: template argument 2 is invalid
11 | pair<int , pait<int , int>> p[300000];
| ^~
swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:17:14: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
17 | p[i].first=W[i];
| ^~~~~
swap.cpp:18:14: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
18 | p[i].second.first=U[i];
| ^~~~~~
swap.cpp:19:14: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
19 | p[i].second.second=V[i];
| ^~~~~~
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:49:3: error: 'x' was not declared in this scope
49 | x=p[i].second.first;
| ^
swap.cpp:49:10: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
49 | x=p[i].second.first;
| ^~~~~~
swap.cpp:50:9: error: 'y' was not declared in this scope
50 | y=p[i].second.second;
| ^
swap.cpp:50:16: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
50 | y=p[i].second.second;
| ^~~~~~
swap.cpp:53:32: error: 'X' was not declared in this scope
53 | if(fnd(x)==fnd(y) || a[X]>2 || a[y]>2){
| ^
swap.cpp:59:16: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
59 | return p[i].first;
| ^~~~~
swap.cpp: In function 'int fnd(int)':
swap.cpp:27:12: warning: control reaches end of non-void function [-Wreturn-type]
27 | else t[xx]=fnd(t[xx]);
| ~~~~~^~~~~~~~~~~