sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:5:11: error: 'N' was not declared in this scope
5 | int pos[N];
| ^
sorting.cpp:6:24: error: 'pos' was not declared in this scope; did you mean 'pow'?
6 | for(int i=0;i<N;i++) pos[s[i]]=i;
| ^~~
| pow
sorting.cpp:10:12: error: 'pos' was not declared in this scope; did you mean 'pow'?
10 | Q[i]=pos[s[i]];
| ^~~
| pow
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[]) {
| ~~~~^~~