sorting.cpp: In function 'void swapa(int, int)':
sorting.cpp:10:5: error: 'st' was not declared in this scope; did you mean 's'?
10 | if(st.find(x)==st.end() && st.find(y)!=st.end()) {
| ^~
| s
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:59:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
59 | for(int i=0; i<v.size(); i++) P[i] = v[i].first, Q[i] = v[i].second;
| ~^~~~~~~~~
sorting.cpp:60:17: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
60 | return v.size();
| ~~~~~~^~
sorting.cpp:55:4: warning: label 'end' defined but not used [-Wunused-label]
55 | end:;
| ^~~
sorting.cpp:24:39: warning: unused parameter 'M' [-Wunused-parameter]
24 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:71:1: warning: control reaches end of non-void function [-Wreturn-type]
71 | }
| ^