sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:26:39: warning: unused parameter 'M' [-Wunused-parameter]
26 | int findSwapPairs(int n, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:26:46: warning: unused parameter 'X' [-Wunused-parameter]
26 | int findSwapPairs(int n, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp:26:55: warning: unused parameter 'Y' [-Wunused-parameter]
26 | int findSwapPairs(int n, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~
sorting.cpp: In function 'int main()':
sorting.cpp:77:44: warning: 'M' is used uninitialized in this function [-Wuninitialized]
77 | cout << findSwapPairs(n, S, M, X, Y, P, Q) << endl;
| ^
sorting.cpp:78:33: warning: ''target_mem_ref' not supported by dump_expr<expression error>' may be used uninitialized in this function [-Wmaybe-uninitialized]
78 | rep (i, 0, 5) cout << P[i] << " " << Q[i] << endl;
| ^~~
sorting.cpp:78:43: warning: ''target_mem_ref' not supported by dump_expr<expression error>' may be used uninitialized in this function [-Wmaybe-uninitialized]
78 | rep (i, 0, 5) cout << P[i] << " " << Q[i] << endl;
| ^
/usr/bin/ld: /tmp/cc4atPOZ.o: in function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'; /tmp/ccFsWaF0.o:sorting.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status