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:92:73: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'll' {aka 'int'} [-Wsign-compare]
92 | if (max({ subtree[0].size(), subtree[1].size(), subtree[2].size() }) == (r - 1) / 2) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
fun.cpp:96: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]
96 | if (mx == subtree[0].size()) na = 0;
| ~~~^~~~~~~~~~~~~~~~~~~~
fun.cpp:97: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]
97 | if (mx == subtree[1].size()) na = 1;
| ~~~^~~~~~~~~~~~~~~~~~~~
fun.cpp:98: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]
98 | if (mx == subtree[2].size()) na = 2;
| ~~~^~~~~~~~~~~~~~~~~~~~
fun.cpp:113:17: warning: comparison of integer expressions of different signedness: 'll' {aka 'int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
113 | for (i = 0; i < ans.size(); i++) assert(ans[i] != c);
| ~~^~~~~~~~~~~~
fun.cpp:63:6: warning: variable 'chk' set but not used [-Wunused-but-set-variable]
63 | ll chk = 0;
| ^~~
In file included from /usr/include/c++/10/cassert:44,
from fun.cpp:3:
fun.cpp:117:20: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
117 | assert(ans.size() == N);
| ~~~~~~~~~~~^~~~
fun.cpp:99:5: warning: 'na' may be used uninitialized in this function [-Wmaybe-uninitialized]
99 | if (na == a) {
| ^~