sorting.cpp:29:1: error: 'vector' does not name a type
29 | vector<int> S;
| ^~~~~~
sorting.cpp:30:1: error: 'vector' does not name a type
30 | vector<int> at;
| ^~~~~~
sorting.cpp: In function 'void swap(int, int)':
sorting.cpp:36:15: error: 'S' was not declared in this scope
36 | int tmp = S[a];
| ^
sorting.cpp:40:5: error: 'at' was not declared in this scope; did you mean 'a'?
40 | at[S[a]] = a;
| ^~
| a
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:49:5: error: 'S' was not declared in this scope
49 | S.assign(N, 0);
| ^
sorting.cpp:54:5: error: 'at' was not declared in this scope
54 | at.assign(N, 0);
| ^~
sorting.cpp:44:40: warning: unused parameter 'M' [-Wunused-parameter]
44 | int findSwapPairs(int N, int ss[], int M, int X[], int Y[], int P[], int Q[])
| ~~~~^
sorting.cpp:44:65: warning: unused parameter 'P' [-Wunused-parameter]
44 | int findSwapPairs(int N, int ss[], int M, int X[], int Y[], int P[], int Q[])
| ~~~~^~~
sorting.cpp:44:74: warning: unused parameter 'Q' [-Wunused-parameter]
44 | int findSwapPairs(int N, int ss[], int M, int X[], int Y[], int P[], int Q[])
| ~~~~^~~