sorting.cpp:4:1: error: expected identifier before 'int'
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ^~~
sorting.cpp:3:16: error: expected ';' before 'int'
3 | using namespace
| ^
| ;
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:6:28: error: 's' was not declared in this scope
6 | for(int i=0;i<N;i++) pos[s[i]]=i;
| ^
sorting.cpp:10:16: error: 's' was not declared in this scope
10 | Q[i]=pos[s[i]];
| ^
sorting.cpp:15:12: error: 'n' was not declared in this scope
15 | return n;
| ^
sorting.cpp:4:30: warning: unused parameter 'S' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp:4:39: warning: unused parameter 'M' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:4:46: warning: unused parameter 'X' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp:4:55: warning: unused parameter 'Y' [-Wunused-parameter]
4 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~