sorting.cpp: In function 'bool stg(int, int*, int*)':
sorting.cpp:62:18: warning: declaration of 'i' shadows a previous local [-Wshadow]
62 | for (int i = 0; i < sz(v); ++i)
| ^
sorting.cpp:46:14: note: shadowed declaration is here
46 | for (int i = 0; i < n; ++i)
| ^
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:73:78: warning: declaration of 'Y' shadows a global declaration [-Wshadow]
73 | int findSwapPairs(int N_, int S[], int M_, int X[], int Y[], int P[], int Q[])
| ^
sorting.cpp:13:11: note: shadowed declaration is here
13 | int X[N], Y[N];
| ^
sorting.cpp:73:78: warning: declaration of 'X' shadows a global declaration [-Wshadow]
73 | int findSwapPairs(int N_, int S[], int M_, int X[], int Y[], int P[], int Q[])
| ^
sorting.cpp:13:5: note: shadowed declaration is here
13 | int X[N], Y[N];
| ^
sorting.cpp:73:78: warning: declaration of 'S' shadows a global declaration [-Wshadow]
73 | int findSwapPairs(int N_, int S[], int M_, int X[], int Y[], int P[], int Q[])
| ^
sorting.cpp:12:5: note: shadowed declaration is here
12 | int S[N];
| ^
sorting.cpp:104:12: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
104 | return ans;
| ^~~