#BS0000024. Những con bò hung hăng (Aggressive Cows)
Những con bò hung hăng (Aggressive Cows)
Aggressive Cows
Source: SPOJ
Version: Phuoc Hung OJ Extended
Problem Statement
There are stalls on a line at positions . Place cows in distinct stalls. If the selected positions are , the value of the placement is
Find the maximum possible value.
Input
The first line contains . The next lines contain stall positions.
Output
Print the largest possible minimum distance.
Subtasks
- Subtask 1 — 20%: .
- Subtask 2 — 30%: .
- Subtask 3 — 50%: , , .
Examples
Input
5 3
1
2
8
4
9
Output
3
Explanation
Placing cows at achieves minimum distance , and distance is impossible.