towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:12:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
12 | d[0][i]=getDistance(0, i);
| ^
towns.cpp:22:32: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
22 | d[ind1][i]=getDistance(ind1, i);
| ^~~~
towns.cpp:22:38: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
22 | d[ind1][i]=getDistance(ind1, i);
| ^
towns.cpp:58:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
58 | return -max(val, diameter-val);
| ^~~~~~~~~~~~~~~~~~~~~~~
towns.cpp:81:32: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
81 | for (long long j=0; j+1<cur.size(); j+=2)
| ~~~^~~~~~~~~~~
towns.cpp:83:55: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
83 | long long res=getDistance(cur[j], cur[j+1]);
| ^
towns.cpp:83:55: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
towns.cpp:101:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
101 | return max(val, diameter-val);
| ~~~^~~~~~~~~~~~~~~~~~~
towns.cpp:102:26: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
102 | for (long long i=0; i<vec.size(); i++)
| ~^~~~~~~~~~~
towns.cpp:113:46: warning: conversion from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' may change value [-Wconversion]
113 | long long res=getDistance(vec[i], tie);
| ^
towns.cpp:113:43: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
113 | long long res=getDistance(vec[i], tie);
| ^~~
towns.cpp:118:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
118 | return max(val, diameter-val);
| ~~~^~~~~~~~~~~~~~~~~~~
towns.cpp:120:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
120 | return -max(val, diameter-val);
| ^~~~~~~~~~~~~~~~~~~~~~~
towns.cpp:6:28: warning: unused parameter 'sub' [-Wunused-parameter]
6 | int hubDistance(int n, int sub)
| ~~~~^~~