towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:48:8: warning: declaration of 'l' shadows a previous local [-Wshadow]
48 | int l=fi-inter,r=se-inter;
| ^
towns.cpp:29:12: note: shadowed declaration is here
29 | int mx=0,l=0,r=0;
| ^
towns.cpp:48:19: warning: declaration of 'r' shadows a previous local [-Wshadow]
48 | int l=fi-inter,r=se-inter;
| ^
towns.cpp:29:16: note: shadowed declaration is here
29 | int mx=0,l=0,r=0;
| ^
towns.cpp: In function 'int read()':
towns.cpp:8:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | int read(){int x;scanf("%d",&x);return x;}
| ~~~~~^~~~~~~~~
towns.cpp: In function 'void file(std::string)':
towns.cpp:12:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | freopen((s+".in").c_str(),"r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
towns.cpp:13:9: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | freopen((s+".out").c_str(),"w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~