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:100:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
100 | return max(val, diameter-val);
| ~~~^~~~~~~~~~~~~~~~~~~
towns.cpp:101: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]
101 | for (long long i=0; i<vec.size();)
| ~^~~~~~~~~~~
towns.cpp:109: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]
109 | long long res=getDistance(vec[i], tie);
| ^
towns.cpp:109:43: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
109 | long long res=getDistance(vec[i], tie);
| ^~~
towns.cpp:117:19: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
117 | return max(val, diameter-val);
| ~~~^~~~~~~~~~~~~~~~~~~
towns.cpp:119:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
119 | return -max(val, diameter-val);
| ^~~~~~~~~~~~~~~~~~~~~~~
towns.cpp:6:28: warning: unused parameter 'sub' [-Wunused-parameter]
6 | int hubDistance(int n, int sub)
| ~~~~^~~