sorting.cpp: In function 'int dfs(int*, std::vector<std::pair<int, int> >&, int)':
sorting.cpp:16:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (vis[k]) return k; vis[k] = 1;
^~
sorting.cpp:16:24: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
if (vis[k]) return k; vis[k] = 1;
^~~
sorting.cpp: In function 'bool possible(int)':
sorting.cpp:30:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pr.size() > k) return false;
~~~~~~~~~~^~~
sorting.cpp:35:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pr.size() <= i) {
~~~~~~~~~~^~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:53:7: warning: declaration of 'm' shadows a global declaration [-Wshadow]
int m = (l+r)/2;
^
sorting.cpp:10:5: note: shadowed declaration is here
int m, *x, *y, *p, *q;
^