Towards the Capital

In Sheldor's empire, the cities form a tree with cities as vertices and roads as edges. He wishes to choose a capital among his cities and to do that, his ministers come up with the following definition:

  • The eccentricity of a city \(v\) is the maximum distance from \(v\) to any city.
  • A city is central if it's eccentricity is the least.

Which is the only central city in this empire?

Input File: Link

Input Constraints and Details:

  • The empire contains of 100 cities.
  • Each line in the Input File contains two integers \(u\) and \(v\). This refers to the fact that there is a road connecting \(u\) and \(v\).

Problem Loading...

Note Loading...

Set Loading...