sorting.cpp:8:19: error: 'std::vector<int> P' redeclared as different kind of entity
8 | vector<int> X, Y, P, Q;
| ^
sorting.cpp:5:34: note: previous declaration 'typedef struct std::pair<long long int, int> P'
5 | typedef pair<long long int, int> P;
| ^
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:12:12: warning: unused variable 'j' [-Wunused-variable]
12 | int i, j;
| ^
sorting.cpp:10:41: warning: unused parameter 'M' [-Wunused-parameter]
10 | int findSwapPairs(int N2, int S2[], int M, int X2[], int Y2[], int P1[], int P2[]) {
| ~~~~^