sorting.cpp: In function 'bool can(int)':
sorting.cpp:18:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<a.size();i++){
~^~~~~~~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:41:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<a.size();i++){
~^~~~~~~~~
sorting.cpp:48:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(c.size() < md)c.push_back({0,0});
~~~~~~~~~^~~~
sorting.cpp:27:57: warning: unused parameter 'Y' [-Wunused-parameter]
int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
^
sorting.cpp:30:24: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
int md,lo=0,hi = M,ans;
^~~
sorting.cpp:48:17: warning: 'md' may be used uninitialized in this function [-Wmaybe-uninitialized]
while(c.size() < md)c.push_back({0,0});
~~~~~~~~~^~~~