towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:27:53: warning: conversion from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'} to 'int' may change value [-Wconversion]
27 | int a = max_element(dist0.begin(), dist0.end()) - dist0.begin();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
towns.cpp:35:51: warning: conversion from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >::difference_type' {aka 'long int'} to 'int' may change value [-Wconversion]
35 | int b = max_element(dist.begin(), dist.end()) - dist.begin();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
towns.cpp:53:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
53 | for (auto [len, adj]: mp) {
| ^
towns.cpp:54:23: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
54 | R -= adj.size();
| ^
towns.cpp:57:28: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
57 | if (adj.size() <= n / 2) {
| ~~~~~~~~~~~^~~~~~~~
towns.cpp:88:23: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
88 | L += adj.size();
| ^
towns.cpp:21:28: warning: unused parameter 'sub' [-Wunused-parameter]
21 | int hubDistance(int n, int sub) {
| ~~~~^~~