LearnPy Hub
← Arena
EasyRating 1050

Farthest from a Station

Cities 0..n−1 are in a row; some have space stations. Print the largest distance from any city to its nearest station.

Input

n and m, then m station positions.

Output

One integer.

Sample 1

Input
5 2
0 4
Output
2

Sample 2

Input
6 6
0 1 2 4 3 5
Output
0
solution.py
Output appears here
Farthest from a Station · Python Arena problem · LearnPy Hub