sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:67:21: note: in expansion of macro 'ANSWER'
67 | if (issorted()) ANSWER;
| ^~~~~~
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:75:17: note: in expansion of macro 'MYSTEP'
75 | MYSTEP(ind[0], 1);
| ^~~~~~
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:77:17: note: in expansion of macro 'MYSTEP'
77 | MYSTEP(ind[0], 0);
| ^~~~~~
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:82:17: note: in expansion of macro 'MYSTEP'
82 | MYSTEP(ind[1], 0);
| ^~~~~~
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:84:17: note: in expansion of macro 'MYSTEP'
84 | MYSTEP(ind[1], 1);
| ^~~~~~
sorting.cpp:43:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
43 | 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:47:9: note: in expansion of macro 'UPDATE'
47 | UPDATE(u, v);\
| ^~~~~~
sorting.cpp:88:13: note: in expansion of macro 'MYSTEP'
88 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:87:15: note: shadowed declaration is here
87 | replr(i, 2, n-1) {
| ^
sorting.cpp:7:33: note: in definition of macro 'replr'
7 | #define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
| ^
sorting.cpp:35:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
35 | 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:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:88:13: note: in expansion of macro 'MYSTEP'
88 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:87:15: note: shadowed declaration is here
87 | replr(i, 2, n-1) {
| ^
sorting.cpp:7:33: note: in definition of macro 'replr'
7 | #define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
| ^
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:88:13: note: in expansion of macro 'MYSTEP'
88 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:43:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
43 | 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(X[ptr], Y[ptr]);\
| ^~~~~~
sorting.cpp:88:13: note: in expansion of macro 'MYSTEP'
88 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:87:15: note: shadowed declaration is here
87 | replr(i, 2, n-1) {
| ^
sorting.cpp:7:33: note: in definition of macro 'replr'
7 | #define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
| ^
sorting.cpp:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:90:9: note: in expansion of macro 'MYSTEP'
90 | MYSTEP(0, 0);
| ^~~~~~
sorting.cpp:43:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
43 | 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:47:9: note: in expansion of macro 'UPDATE'
47 | UPDATE(u, v);\
| ^~~~~~
sorting.cpp:93:13: note: in expansion of macro 'MYSTEP'
93 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:92:13: note: shadowed declaration is here
92 | 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:35:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
35 | 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:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:93:13: note: in expansion of macro 'MYSTEP'
93 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:92:13: note: shadowed declaration is here
92 | 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:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:48:25: note: in expansion of macro 'ANSWER'
48 | if (issorted()) ANSWER;\
| ^~~~~~
sorting.cpp:93:13: note: in expansion of macro 'MYSTEP'
93 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:43:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
43 | 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(X[ptr], Y[ptr]);\
| ^~~~~~
sorting.cpp:93:13: note: in expansion of macro 'MYSTEP'
93 | MYSTEP(ind[i], i);
| ^~~~~~
sorting.cpp:92:13: note: shadowed declaration is here
92 | 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:39:24: warning: conversion from 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
39 | return ans.size();\
| ~~~~~~~~^~
sorting.cpp:96:5: note: in expansion of macro 'ANSWER'
96 | ANSWER;
| ^~~~~~
sorting.cpp:53:39: warning: unused parameter 'M' [-Wunused-parameter]
53 | int findSwapPairs(int N, int S[], int M, int X[], int Y[], int P[], int Q[]) {
| ~~~~^