sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:20:23: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
20 | if (ans.size()<=i)
| ~~~~~~~~~~^~~
sorting.cpp:22:30: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
22 | while (ans.size()<i) ans.push_back({0, 0});
| ~~~~~~~~~~^~
sorting.cpp:26:14: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
26 | cnt=ans.size();
| ~~~~~~~~^~
sorting.cpp:10:39: warning: unused parameter 'M' [-Wunused-parameter]
10 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^