sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:27: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]
27 | if(v.size()<=mid){
| ~~~~~~~~^~~~~
sorting.cpp:28: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]
28 | for(int i=0;i<v.size();++i){
| ~^~~~~~~~~
sorting.cpp:31:9: warning: declaration of 'a' shadows a global declaration [-Wshadow]
31 | int a=plate[X[i]],b=plate[Y[i]];
| ^
sorting.cpp:7:5: note: shadowed declaration is here
7 | int a[maxn],pos[maxn],plate[maxn];
| ^
sorting.cpp:35:20: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
35 | for(int i=v.size();i<M;++i){
| ~~~~~~^~