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