sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:34:15: warning: conversion from 'std::map<long long int, long long int>::mapped_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
34 | S[i]=ord[S[i]];
| ^
sorting.cpp:45:6: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
45 | P[R]=k;
| ^
sorting.cpp:56:6: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
56 | P[R]=k;
| ^
sorting.cpp:68:6: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
68 | P[R]=k;
| ^
sorting.cpp:69:7: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
69 | Q[R]=i-1;
| ~^~
sorting.cpp:89:6: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | P[R]=k;
| ^
sorting.cpp:90:7: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
90 | Q[R]=i-1;
| ~^~
sorting.cpp:97:9: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
97 | return R;
| ^
sorting.cpp:19:39: warning: unused parameter 'M' [-Wunused-parameter]
19 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^
sorting.cpp:19:46: warning: unused parameter 'X' [-Wunused-parameter]
19 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^~~