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[2],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[2],p[111],cnt;
| ^
towns.cpp: In function 'int find_majority(std::vector<int>)':
towns.cpp:33:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int i=0;i<a.size();i+=2)
| ~^~~~~~~~~
towns.cpp: In function 'int check(int)':
towns.cpp:46:29: warning: declaration of 'cnt' shadows a global declaration [-Wshadow]
46 | int w=find_majority(ve),cnt=0;
| ^~~
towns.cpp:4:41: note: shadowed declaration is here
4 | int n,dist[111][111],u,v,R,sz[2],p[111],cnt;
| ^~~
towns.cpp:49:14: warning: declaration of 'int i' shadows a parameter [-Wshadow]
49 | for (int i:ve)
| ^
towns.cpp:40:15: note: shadowed declaration is here
40 | int check(int i){
| ~~~~^
towns.cpp:53:14: warning: declaration of 'int i' shadows a parameter [-Wshadow]
53 | for (int i:ve)
| ^
towns.cpp:40:15: note: shadowed declaration is here
40 | int check(int i){
| ~~~~^
towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:57:28: warning: unused parameter 'sub' [-Wunused-parameter]
57 | int hubDistance(int N, int sub){
| ~~~~^~~