sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:70:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
70 | swapp(idx[a1[i]], idx[i]);
| ~~~~~~~~~^
sorting.cpp:70:38: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
70 | swapp(idx[a1[i]], idx[i]);
| ~~~~~^
sorting.cpp:72:22: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
72 | if (v.size()>mid)
| ~~~~~~~~^~~~
sorting.cpp:83:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
83 | swapp1(X[i],Y[i]);
| ~~~^
sorting.cpp:83:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
83 | swapp1(X[i],Y[i]);
| ~~~^
sorting.cpp:88:39: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
88 | swapp1(idx[v[i-1].first],idx[v[i-1].second]);
| ~~~~~~~~~~~~~~~~^
sorting.cpp:88:58: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
88 | swapp1(idx[v[i-1].first],idx[v[i-1].second]);
| ~~~~~~~~~~~~~~~~~^
sorting.cpp:91:21: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
91 | if (v.size()<=mid)
| ~~~~~~~~^~~~~
sorting.cpp:96:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
96 | for (int j=0; j<ans.size(); j++)
| ~^~~~~~~~~~~
sorting.cpp:103:24: warning: comparison of integer expressions of different signedness: 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
103 | while (ans1.size()<anss)
| ~~~~~~~~~~~^~~~~
sorting.cpp:106:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
106 | for (int i=0; i<ans1.size(); i++)
| ~^~~~~~~~~~~~
sorting.cpp:108:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
108 | P[i]=ans1[i].first-1;
sorting.cpp:109:26: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
109 | Q[i]=ans1[i].second-1;
sorting.cpp:112:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
112 | return anss;
| ^~~~