sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:34:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for(int i=0;i<v.size();i++)
| ~^~~~~~~~~
sorting.cpp:5:11: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
5 | #define F first
sorting.cpp:36:26: note: in expansion of macro 'F'
36 | P[i]=v[i].F;
| ^
sorting.cpp:6:11: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
6 | #define S second
sorting.cpp:37:26: note: in expansion of macro 'S'
37 | Q[i]=v[i].S;
| ^
In file included from /usr/include/c++/10/cassert:44,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from sorting.cpp:2:
sorting.cpp:39:17: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
39 | assert(v.size()<=M);
| ~~~~~~~~^~~
sorting.cpp:40:20: warning: conversion from 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
40 | return v.size();
| ~~~~~~^~
sorting.cpp:14:48: warning: unused parameter 'X' [-Wunused-parameter]
14 | int findSwapPairs(int N, int arr[], int M, int X[], int Y[], int P[], int Q[])
| ~~~~^~~
sorting.cpp:14:57: warning: unused parameter 'Y' [-Wunused-parameter]
14 | int findSwapPairs(int N, int arr[], int M, int X[], int Y[], int P[], int Q[])
| ~~~~^~~