Our problem is where to locate our TV station's broadcasting antenna. We know
the locations of the towns we should serve. We must place the antenna at a point
whose coordinates are both integers. Fortunately, we are located on the
flat, flat prairie, so the only remaining issue is to locate the antenna to minimize the
broadcast radius that includes all the towns.
We have int[] x and int[] y giving the locations of the towns; the i-th element
of x and y gives the coordinates of the i-th town.
Create a class TVAntenna that contains a method minRadius that is given x
and y, and returns the minimum
broadcast radius that can reach all the towns from a location with integer coordinates.
|