sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:42:44: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
42 | firstOut = order[id = j];
| ^
sorting.cpp:55:20: warning: declaration of 'id1' shadows a previous local [-Wshadow]
55 | ll id1 = revS[firstOut];
| ^~~
sorting.cpp:35:13: note: shadowed declaration is here
35 | int id1 = -1;
| ^~~
sorting.cpp:61:26: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
61 | P[res] = id1;
| ^~~
sorting.cpp:62:26: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
62 | Q[res] = id2;
| ^~~
sorting.cpp:66:12: warning: declaration of 'ooo' shadows a previous local [-Wshadow]
66 | ll ooo = 0;
| ^~~
sorting.cpp:11:8: note: shadowed declaration is here
11 | ll ooo = 0;
| ^~~
sorting.cpp:67:22: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
67 | for (int i = g; i < N; i++) {
| ^
sorting.cpp:78:9: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
78 | return res1;
| ^~~~
sorting.cpp:7:39: warning: unused parameter 'M' [-Wunused-parameter]
7 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^