towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:44:26: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
44 | ll val = getDist(a, i);
| ^
towns.cpp:54:31: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
54 | ll distA = getDist(i, a);
| ^
towns.cpp:55:31: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
55 | ll distB = getDist(i, b);
| ^
towns.cpp:72:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
72 | ll distX = getDist(x, a) - e.first;
| ^
towns.cpp:72:35: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
72 | ll distX = getDist(x, a) - e.first;
| ^
towns.cpp:74:26: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
74 | if (find(x) == find(y)) continue;
| ^
towns.cpp:74:37: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
74 | if (find(x) == find(y)) continue;
| ^
towns.cpp:75:36: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
75 | ll distY = getDist(y, a) - e.first;
| ^
towns.cpp:75:39: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
75 | ll distY = getDist(y, a) - e.first;
| ^
towns.cpp:76:29: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
76 | if (getDist(x, y) < distX + distY) {
| ^
towns.cpp:76:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
76 | if (getDist(x, y) < distX + distY) {
| ^
towns.cpp:77:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
77 | unite(x, y);
| ^
towns.cpp:77:30: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
77 | unite(x, y);
| ^
towns.cpp:83:35: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
83 | ll distA = getDist(i, a);
| ^
towns.cpp:84:35: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
84 | ll distB = getDist(i, b);
| ^
towns.cpp:101:16: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::unordered_map<long long int, std::vector<long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
101 | return bad == hubs.size() ? -res : res;
| ~~~~^~~~~~~~~~~~~~
towns.cpp:101:31: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
101 | return bad == hubs.size() ? -res : res;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
towns.cpp:31:28: warning: unused parameter 'sub' [-Wunused-parameter]
31 | int hubDistance(int n, int sub) {
| ~~~~^~~