swap.cpp:5:26: error: conflicting declaration 'std::pair<int, std::pair<int, int> > p [200000]'
5 | pair<int, pair<int,int> >p[200000];
| ^
swap.cpp:4:78: note: previous declaration as 'int p [200000]'
4 | int a,b,i,n,m,link[200000],edge[200000],sz[200000],x,y,ans[200000],h[200000],p[200000],d,e;
| ^
swap.cpp: In function 'void init(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
swap.cpp:36:10: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
36 | p[i].first=W[i];
| ^~~~~
swap.cpp:37:10: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
37 | p[i].second.first=U[i];
| ^~~~~~
swap.cpp:38:10: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
38 | p[i].second.second=V[i];
| ^~~~~~
swap.cpp: In function 'int getMinimumFuelCapacity(int, int)':
swap.cpp:49:19: error: request for member 'first' in 'p[(m - 1)]', which is of non-class type 'int'
49 | return p[m-1].first;
| ^~~~~
swap.cpp:53:15: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
53 | if(p[i].second.second==X){
| ^~~~~~
swap.cpp:54:16: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
54 | d=p[i].first;
| ^~~~~
swap.cpp:56:15: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
56 | if(p[i].second.second==Y){
| ^~~~~~
swap.cpp:57:16: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
57 | e=p[i].first;
| ^~~~~
swap.cpp:60:21: error: request for member 'first' in 'p[2]', which is of non-class type 'int'
60 | return max(p[2].first,max(d,e));
| ^~~~~
swap.cpp:69:12: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
69 | x=p[i].second.first;
| ^~~~~~
swap.cpp:70:12: error: request for member 'second' in 'p[i]', which is of non-class type 'int'
70 | y=p[i].second.second;
| ^~~~~~
swap.cpp:79:19: error: request for member 'first' in 'p[i]', which is of non-class type 'int'
79 | return p[i].first;
| ^~~~~