sorting.cpp: In function 'int rnd(int)':
sorting.cpp:18:33: warning: conversion from 'std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
18 | int rnd(int x) { return mrand() % x;}
| ~~~~~~~~^~~
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:70:50: warning: declaration of 'y' shadows a global declaration [-Wshadow]
70 | int findSwapPairs(int n,int* s,int m,int* x,int* y,int* p,int* q) {
| ~~~~~^
sorting.cpp:25:29: note: shadowed declaration is here
25 | int n,a[N],s[N],pos[N],x[N],y[N];
| ^
sorting.cpp:70:43: warning: declaration of 'x' shadows a global declaration [-Wshadow]
70 | int findSwapPairs(int n,int* s,int m,int* x,int* y,int* p,int* q) {
| ~~~~~^
sorting.cpp:25:24: note: shadowed declaration is here
25 | int n,a[N],s[N],pos[N],x[N],y[N];
| ^
sorting.cpp:70:30: warning: declaration of 's' shadows a global declaration [-Wshadow]
70 | int findSwapPairs(int n,int* s,int m,int* x,int* y,int* p,int* q) {
| ~~~~~^
sorting.cpp:25:12: note: shadowed declaration is here
25 | int n,a[N],s[N],pos[N],x[N],y[N];
| ^
sorting.cpp:70:23: warning: declaration of 'n' shadows a global declaration [-Wshadow]
70 | int findSwapPairs(int n,int* s,int m,int* x,int* y,int* p,int* q) {
| ~~~~^
sorting.cpp:25:5: note: shadowed declaration is here
25 | int n,a[N],s[N],pos[N],x[N],y[N];
| ^
sorting.cpp:77:11: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
77 | int md=l+r>>1;
| ~^~