towns.cpp: In function 'int d(int, int)':
towns.cpp:5:18: warning: declaration of 'v' shadows a global declaration [-Wshadow]
5 | int d(int u, int v){
| ~~~~^
towns.cpp:4:24: note: shadowed declaration is here
4 | int n,dist[111][111],u,v,R,sz[111],p[111],cnt;
| ^
towns.cpp:5:11: warning: declaration of 'u' shadows a global declaration [-Wshadow]
5 | int d(int u, int v){
| ~~~~^
towns.cpp:4:22: note: shadowed declaration is here
4 | int n,dist[111][111],u,v,R,sz[111],p[111],cnt;
| ^
towns.cpp: In function 'int check(int)':
towns.cpp:38:14: warning: declaration of 'int i' shadows a parameter [-Wshadow]
38 | for (int i:a){
| ^
towns.cpp:32:15: note: shadowed declaration is here
32 | int check(int i){
| ~~~~^
towns.cpp:49:20: warning: declaration of 'cnt' shadows a global declaration [-Wshadow]
49 | int t=st.top(),cnt=st2.size();
| ^~~
towns.cpp:4:43: note: shadowed declaration is here
4 | int n,dist[111][111],u,v,R,sz[111],p[111],cnt;
| ^~~
towns.cpp:49:32: warning: conversion from 'std::stack<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
49 | int t=st.top(),cnt=st2.size();
| ~~~~~~~~^~
towns.cpp:51:13: warning: declaration of 'u' shadows a global declaration [-Wshadow]
51 | int u=st.top();
| ^
towns.cpp:4:22: note: shadowed declaration is here
4 | int n,dist[111][111],u,v,R,sz[111],p[111],cnt;
| ^
towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:72:28: warning: unused parameter 'sub' [-Wunused-parameter]
72 | int hubDistance(int N, int sub){
| ~~~~^~~