sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:22:23: warning: declaration of 'N' shadows a global declaration [-Wshadow]
22 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:5:18: note: shadowed declaration is here
5 | int cur[200005], N;
| ^
sorting.cpp:46:12: warning: declaration of 'i' shadows a previous local [-Wshadow]
46 | for(int i=0;i<N;i++) {
| ^
sorting.cpp:39:10: note: shadowed declaration is here
39 | for(int i=l;i<M;i++) {
| ^
sorting.cpp:49:10: warning: declaration of 'l' shadows a previous local [-Wshadow]
49 | int l = i, j = cur[i];
| ^
sorting.cpp:28:6: note: shadowed declaration is here
28 | int l=0, r=M;
| ^
sorting.cpp:59:12: warning: declaration of 'i' shadows a previous local [-Wshadow]
59 | for(int i=0;i<N;i++) pos[S[i]] = i;
| ^
sorting.cpp:39:10: note: shadowed declaration is here
39 | for(int i=l;i<M;i++) {
| ^
sorting.cpp:72:1: warning: control reaches end of non-void function [-Wreturn-type]
72 | }
| ^