sorting.cpp: In function 'bool chk(int, int*, int*, int*, int*, int*)':
sorting.cpp:12:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
12 | if(vis[i] or i==a[i]) continue; int j = i;
| ^~
sorting.cpp:12:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
12 | if(vis[i] or i==a[i]) continue; int j = i;
| ^~~
sorting.cpp:18:16: warning: comparison of integer expressions of different signedness: 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
18 | if(v.size()>m) return 0;
| ~~~~~~~~^~
sorting.cpp:22:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | if(i<v.size()){
| ~^~~~~~~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:30:23: warning: declaration of 'N' shadows a global declaration [-Wshadow]
30 | int findSwapPairs(int N, int A[], int m, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:3:11: note: shadowed declaration is here
3 | const int N = (int)2e5+10;
| ^