fun.cpp: In function 'std::vector<int> createFunTour(int, int)':
fun.cpp:38:16: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | for (i = 1; i < dis.size(); i++) {
| ~~^~~~~~~~~~~~
fun.cpp:78:78: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'll' {aka 'int'} [-Wsign-compare]
78 | if (chk||max({ subtree[0].size(), subtree[1].size(), subtree[2].size() }) >= (r-1)/2) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
fun.cpp:82:12: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | if (mx == subtree[0].size()) na = 0;
| ~~~^~~~~~~~~~~~~~~~~~~~
fun.cpp:83:12: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
83 | if (mx == subtree[1].size()) na = 1;
| ~~~^~~~~~~~~~~~~~~~~~~~
fun.cpp:84:12: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | if (mx == subtree[2].size()) na = 2;
| ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/cassert:44,
from fun.cpp:3:
fun.cpp:101:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
101 | assert(ans.size()==N);
| ~~~~~~~~~~^~~
fun.cpp:85:5: warning: 'na' may be used uninitialized in this function [-Wmaybe-uninitialized]
85 | if (na == a) {
| ^~