Antenna
A telecom company is developing a GSM network in the city of Vrsar. Their contract with the city specifies the minimum number of households that need to be covered by the signal. Due to budget constraints they can only build one antenna with a certain range. Since the cost is proportional to the range of the antenna, they would like to place the antenna so that the range required to meet the terms of the contract is minimized. There are N households in Vrsar, each represented by a pair of integer coordinates. The antenna can be placed at any point in the plane (not necessarily with integer coordinates) and the range of the antenna can be any positive real number. If the range of the antenna is R, then a household is covered by the signal if the distance between the antenna and the household is at most R. Write a program that, given the locations of the households and an integer K, finds the minimum range required and one possible location for the antenna so that at least K households are covered by the signal.
4 3
2 2
6 2
6 5
2 8 Output:
2.5
4 3.5Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.