eolymp
bolt
Try our new interface for solving problems
Problems

Gas stations

Gas stations

Along the circular highway with a length of $l$ there are $n$ gas stations. If the driver wants to refuel at some point on the highway, he can drive up to any gas station, where he is happy to serve. Of course, if the fuel suddenly runs out completely, the driver will undoubtedly go to the nearest gas station, even if it means turning back. Nevertheless, occasionally there are unlucky drivers who suddenly run out of fuel right on the road. Determine the maximum possible distance to the nearest gas station that such drivers will have to overcome on foot. \InputFile The first line contains two integers: the length of the highway $l\:(1 \le l \le 10^5)$ and the number of gas stations $n\:(1 \le n \le 10^4)$. The second line contains **n** different integers $l_i\:(0 \le l_i < l)$ --- the positions of the gas stations. \OutputFile Print the maximum possible distance to the nearest gas station with an accuracy of $1$ decimal digit.
Time limit 1 second
Memory limit 128 MiB
Input example #1
5 4
4 0 3 1
Output example #1
1.0
Source ACM ICPC 2012-2013 NEERC Siberian Group