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 find_majority(std::vector<int>)':
towns.cpp:38:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | for (int i=0;i+1<a.size();i+=2)
| ~~~^~~~~~~~~
towns.cpp: In function 'int check(int)':
towns.cpp:60:29: warning: declaration of 'cnt' shadows a global declaration [-Wshadow]
60 | int w=find_majority(ve),cnt=0;
| ^~~
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:63:14: warning: declaration of 'int i' shadows a parameter [-Wshadow]
63 | for (int i:ve)
| ^
towns.cpp:53:15: note: shadowed declaration is here
53 | int check(int i){
| ~~~~^
towns.cpp:60:29: warning: unused variable 'cnt' [-Wunused-variable]
60 | int w=find_majority(ve),cnt=0;
| ^~~
towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:69:28: warning: unused parameter 'sub' [-Wunused-parameter]
69 | int hubDistance(int N, int sub){
| ~~~~^~~