Baltic OI '12 P2 - Mobile

View as PDF

Submit solution


Points: 15 (partial)
Time limit: 0.6s
Memory limit: 64M

Problem types
Baltic Olympiad in Informatics: 2012 Day 1, Problem 2

The well-known mobile network operator Totalphone has set up a number of new base transceiver stations in order to cover a newly-built highway with its network. As always the programmers of Totalphone have been sloppy; as a result, the transmission power cannot be set up individually for the stations, but one can only set the transmission power to a fixed common value for all the stations. In order to minimize power consumption, the company wants to know the maximal distance of a point on the highway to the nearest base transceiver station.

Constraints

1N106

1L109

|xi|,|yi|109

Subtask 1 [25%]

1N5000

Subtask 2 [25%]

1N105

Subtask 3 [50%]

No additional constraints.

Input Specification

The first line of input contains two space-separated integers N and L representing the number of base transceiver stations and the length of the highway, respectively.

N lines follow, each containing a pair of integers xi and yi, which describes the coordinates of a base transceiver station. All points are distinct. Coordinates are sorted in the non-decreasing order with respect to xi coordinates. If two values of xi are the same, then coordinates are sorted with respect to yi coordinates in increasing order.

The highway is a straight line ranging from (0,0) to (L,0).

Output Specification

The only line of output should contain a single number - the maximal distance of a point on the highway to the nearest base transceiver station. Your output will be regarded as correct if it is within an absolute error of 103 of the correct answer.

Sample Input

Copy
2 10
0 0
11 1

Sample Output

Copy
5.545455

Comments

There are no comments at the moment.