sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:40:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
40 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:43:25: note: in expansion of macro 'ANSWER'
43 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:67:5: note: in expansion of macro 'UPDATE'
67 | UPDATE(X[ptr], Y[ptr]);
| ^~~~~~
sorting.cpp:36:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
36 | rep(i, ans.size()) {\
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:43:25: note: in expansion of macro 'ANSWER'
43 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:49:9: note: in expansion of macro 'UPDATE'
49 | UPDATE(u, v);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:70:9: note: shadowed declaration is here
70 | rep(i, n) {
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:40:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
40 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:43:25: note: in expansion of macro 'ANSWER'
43 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:49:9: note: in expansion of macro 'UPDATE'
49 | UPDATE(u, v);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:45:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
45 | rep(i, n) ind[a[i]] = i;\
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:49:9: note: in expansion of macro 'UPDATE'
49 | UPDATE(u, v);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:70:9: note: shadowed declaration is here
70 | rep(i, n) {
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:36:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
36 | rep(i, ans.size()) {\
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:43:25: note: in expansion of macro 'ANSWER'
43 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:50:9: note: in expansion of macro 'UPDATE'
50 | UPDATE(X[ptr], Y[ptr]);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:70:9: note: shadowed declaration is here
70 | rep(i, n) {
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:40:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
40 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:43:25: note: in expansion of macro 'ANSWER'
43 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:50:9: note: in expansion of macro 'UPDATE'
50 | UPDATE(X[ptr], Y[ptr]);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:45:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
45 | rep(i, n) ind[a[i]] = i;\
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:50:9: note: in expansion of macro 'UPDATE'
50 | UPDATE(X[ptr], Y[ptr]);\
| ^~~~~~
sorting.cpp:71:9: note: in expansion of macro 'MYSTEP'
71 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:70:9: note: shadowed declaration is here
70 | rep(i, n) {
| ^
sorting.cpp:9:28: note: in definition of macro 'rep'
9 | #define rep(i, n) for (int i = 0; i < int(n); ++i)
| ^
sorting.cpp:40:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
40 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:73:5: note: in expansion of macro 'ANSWER'
73 | ANSWER;
| ^~~~~~
sorting.cpp:54:39: warning: unused parameter 'M' [-Wunused-parameter]
54 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^