sorting.cpp: In function 'bool check(std::vector<int>, int, int)':
sorting.cpp:26:22: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
26 | if (swaps.size() > x) {
| ~~~~~~~~~~~~~^~~
sorting.cpp:29:24: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
29 | while(swaps.size() < x) {
| ~~~~~~~~~~~~~^~~
sorting.cpp:35:15: warning: declaration of 'auto x' shadows a parameter [-Wshadow]
35 | auto [x, y] = swaps[i];
| ^
sorting.cpp:5:31: note: shadowed declaration is here
5 | bool check(vector<int> p, int x, int n) {
| ~~~~^
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:52: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]
52 | for (int i = 0; i < ans.size(); i++) {
| ~~^~~~~~~~~~~~
sorting.cpp:56:20: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
56 | return ans.size();
| ~~~~~~~~^~