towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:26:7: warning: declaration of 'mx' shadows a previous local [-Wshadow]
26 | int mx=a;
| ^~
towns.cpp:7:17: note: shadowed declaration is here
7 | pair<int, int> mx={0, 0};
| ^~
towns.cpp:33:7: warning: declaration of 'mx' shadows a previous local [-Wshadow]
33 | int mx=a;
| ^~
towns.cpp:7:17: note: shadowed declaration is here
7 | pair<int, int> mx={0, 0};
| ^~
towns.cpp:35:44: warning: comparison of integer expressions of different signedness: 'std::map<int, std::vector<int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
35 | if (mn==mx) if (sz<=(N/2)&&(mpd.size()-1)<=(N/2)&&(N-sz-mpd.size())<=(N/2)) can=1;
| ~~~~~~~~~~~~~~^~~~~~~
towns.cpp:35:70: warning: comparison of integer expressions of different signedness: 'std::map<int, std::vector<int> >::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
35 | if (mn==mx) if (sz<=(N/2)&&(mpd.size()-1)<=(N/2)&&(N-sz-mpd.size())<=(N/2)) can=1;
| ~~~~~~~~~~~~~~~~~^~~~~~~
towns.cpp:36:19: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
36 | sz+=mpd[x].size();
| ^
towns.cpp:6:28: warning: unused parameter 'sub' [-Wunused-parameter]
6 | int hubDistance(int N, int sub) {
| ~~~~^~~