towns.cpp: In function 'int getDist(int, int)':
towns.cpp:14:25: warning: declaration of 'y' shadows a global declaration [-Wshadow]
int getDist(int x, int y)
^
towns.cpp:8:8: note: shadowed declaration is here
int x, y;
^
towns.cpp:14:25: warning: declaration of 'x' shadows a global declaration [-Wshadow]
int getDist(int x, int y)
^
towns.cpp:8:5: note: shadowed declaration is here
int x, y;
^
towns.cpp: In function 'void prepare(int)':
towns.cpp:26:31: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
x = max_element(D0, D0+n) - D0;
~~~~~~~~~~~~~~~~~~~~~~^~~~
towns.cpp:30:31: warning: conversion to 'int' from 'long int' may alter its value [-Wconversion]
y = max_element(D1, D1+n) - D1;
~~~~~~~~~~~~~~~~~~~~~~^~~~
towns.cpp: In function 'bool check(std::vector<int>&, int)':
towns.cpp:38:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(v.size() <= n/2) return 1;
~~~~~~~~~^~~~~~
towns.cpp:47:21: warning: declaration of 'x' shadows a global declaration [-Wshadow]
int x = lista.back();
^
towns.cpp:8:5: note: shadowed declaration is here
int x, y;
^
towns.cpp:68:13: warning: declaration of 'x' shadows a global declaration [-Wshadow]
int x = lista.back();
^
towns.cpp:8:5: note: shadowed declaration is here
int x, y;
^
towns.cpp: In function 'int hubDistance(int, int)':
towns.cpp:122:32: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
cnt2 -= it.second.size();
^
towns.cpp:127:32: warning: conversion to 'int' from 'std::vector<int>::size_type {aka long unsigned int}' may alter its value [-Wconversion]
cnt1 += it.second.size();
^
towns.cpp:91:28: warning: unused parameter 'subtask' [-Wunused-parameter]
int hubDistance(int n, int subtask)
^~~~~~~