sorting.cpp: In function 'std::vector<std::pair<int, int> > daq(int, int)':
sorting.cpp:19: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]
19 | for (int i = 0; i < a.size(); ++i)
| ~~^~~~~~~~~~
sorting.cpp:21:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
21 | while(j<b.size()&&b[j].fi<a[i].fi){
| ~^~~~~~~~~
sorting.cpp:27:12: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | while(j<b.size()) cur.pb(b[j++]);
| ~^~~~~~~~~
sorting.cpp:28: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]
28 | for (int i = 0; i < cur.size(); ++i)
| ~~^~~~~~~~~~~~
sorting.cpp:32:18: warning: declaration of 'j' shadows a previous local [-Wshadow]
32 | for (int j = 0; j < cur.size(); ++j)
| ^
sorting.cpp:17:9: note: shadowed declaration is here
17 | int j=0;
| ^
sorting.cpp:32:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for (int j = 0; j < cur.size(); ++j)
| ~~^~~~~~~~~~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:62:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
62 | for (int i = 0; i < x.size(); ++i)
| ~~^~~~~~~~~~
sorting.cpp:66:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
66 | for (int i = 0; i < y.size(); ++i)
| ~~^~~~~~~~~~
sorting.cpp:70:18: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
70 | return x.size();
| ~~~~~~^~
sorting.cpp:40:39: warning: unused parameter 'M' [-Wunused-parameter]
40 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:40:46: warning: unused parameter 'X' [-Wunused-parameter]
40 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp:40:55: warning: unused parameter 'Y' [-Wunused-parameter]
40 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~