sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:63:70: warning: declaration of 'N' shadows a global declaration [-Wshadow]
int findSwapPairs(int N,int S[],int M,int X[],int Y[],int P[],int Q[])
^
sorting.cpp:32:11: note: shadowed declaration is here
const int N = 200005;
^
sorting.cpp:77:19: warning: declaration of 'pos' shadows a global declaration [-Wshadow]
int l=0,r=n,m,pos=-1;
^~~
sorting.cpp:35:15: note: shadowed declaration is here
vector<int> s,pos;
^~~
sorting.cpp:91:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(solve(i).size()<=i)
~~~~~~~~~~~~~~~^~~
sorting.cpp:95:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(ans.size()<pos)
~~~~~~~~~~^~~~
sorting.cpp:97:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0;j<ans.size();j++)
~^~~~~~~~~~~
sorting.cpp:77:9: warning: unused variable 'l' [-Wunused-variable]
int l=0,r=n,m,pos=-1;
^
sorting.cpp:77:13: warning: unused variable 'r' [-Wunused-variable]
int l=0,r=n,m,pos=-1;
^
sorting.cpp:77:17: warning: unused variable 'm' [-Wunused-variable]
int l=0,r=n,m,pos=-1;
^