407298: GYM102757 C Light Festival

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Light Festivaltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

After losing control of his time machine, Akash finds himself in the middle of late 19th century America, just as Thomas Edison is creating a festival to show off his light bulbs to the masses. Edison is planning on setting up the main showcase at a particular location, represented by a 2D point. To ensure his festival is a success, Edison wants every single person in town to see his festival by appropriately setting the brightness of the lights. If he makes the lights brighter, more people are able to see the lights, but it costs him more money to do so.

Given the locations of all the people in town as 2D points, Edison wants to find the farthest person from the main showcase so that he can set the brightness accordingly. Can Akash find the distance of the farthest person from Edison's showcase?

Input

The first line will consist of a single integer $$$n$$$ ($$$1 \leq n \leq 10^5$$$) representing the number of people in town. The next line consists of two integers $$$a, b$$$ ($$$-10^9 \leq a, b \leq 10^9$$$) indicating the location of Edison's showcase. The next $$$n$$$ lines consist of two integers $$$x, y$$$ ($$$-10^9 \leq x, y \leq 10^9$$$) indicating that there is a person at coordinate $$$(x, y)$$$

Output

Output the distance of the farthest person from Edison's main showcase. Your answer will be judged as correct if it is within $$$10^{-6}$$$ of the true answer.

ExamplesInput
2
0 0
1 0
-1 0
Output
1.0
Input
10
-95 32
-81 -93
61 -46
-21 79
-75 77
79 12
34 71
55 -55
-64 -36
68 -83
-2 33
Output
199.48433522459854

加入题单

上一题 下一题 算法标签: