sorting.cpp: In function 'int main()':
sorting.cpp:71:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
sorting.cpp:73:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
sorting.cpp:74:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &m);
~~~~~^~~~~~~~~~
sorting.cpp:76:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x[i], &y[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~
sorting.cpp:85:20: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
int l = 0, r = m, res;
^~~
/tmp/ccEvoD5P.o: In function `main':
grader.c:(.text.startup+0x0): multiple definition of `main'
/tmp/cctYopeB.o:sorting.cpp:(.text.startup+0x0): first defined here
/tmp/ccEvoD5P.o: In function `main':
grader.c:(.text.startup+0x517): undefined reference to `findSwapPairs(int, int*, int, int*, int*, int*, int*)'
collect2: error: ld returned 1 exit status