foo.cc: In function ‘int main()’:
foo.cc:14:30: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=]
14 | while(std::scanf("%d%d%s",&country[cnt+1].size,&country[cnt+1].dis,country[cnt+1].name)!=EOF) ++cnt;
| ~^ ~~~~~~~~~~~~~~~~~~~
| | |
| int* long long int*
| %lld
foo.cc:19:37: warning: suggest parentheses around ‘+’ inside ‘>>’ [-Wparentheses]
19 | if(sum[i]>=(sum[cnt]+1>>1)){
| ~~~~~~~~^~
foo.cc:17:13: warning: ‘id’ may be used uninitialized [-Wmaybe-uninitialized]
17 | int id;
| ^~