sorting.cpp: In function 'void dfs(int, int)':
sorting.cpp:12:14: warning: declaration of 'x' shadows a global declaration [-Wshadow]
12 | void dfs(int x, int st) {
| ~~~~^
sorting.cpp:6:19: note: shadowed declaration is here
6 | int n,m,b[200005],x[200005],y[200005],p[200005],cnt;
| ^
sorting.cpp:16:24: warning: declaration of 's' shadows a previous local [-Wshadow]
16 | if (s==st) for (auto s : temp) group[cnt].push_back(s);
| ^
sorting.cpp:15:12: note: shadowed declaration is here
15 | for (auto s : adj[x]) {
| ^
sorting.cpp: In function 'bool check(int, bool)':
sorting.cpp:36:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for (int j=0; j<group[cnt].size()-1; ++j) v.push_back(pii(group[cnt][j],group[cnt][j+1]));
| ~^~~~~~~~~~~~~~~~~~~~
sorting.cpp:43:7: warning: declaration of 'cnt' shadows a global declaration [-Wshadow]
43 | int cnt=0;
| ^~~
sorting.cpp:6:49: note: shadowed declaration is here
6 | int n,m,b[200005],x[200005],y[200005],p[200005],cnt;
| ^~~
sorting.cpp:43:7: warning: unused variable 'cnt' [-Wunused-variable]
43 | int cnt=0;
| ^~~
sorting.cpp:55:14: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
55 | if (v.size()<=h+1) return true;
| ~~~~~~~~^~~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:77:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
77 | for (int i=0; i<ans.size(); ++i) P[i]=ans[i].first, Q[i]=ans[i].second;
| ~^~~~~~~~~~~
sorting.cpp:78:17: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
78 | return ans.size();
| ~~~~~~~~^~