atcoder#ARC069D. [ARC069F] Flags
[ARC069F] Flags
Score : points
Problem Statement
Snuke loves flags.
Snuke is placing flags on a line.
The -th flag can be placed at either coordinate or coordinate .
Snuke thinks that the flags look nicer when the smallest distance between two of them, , is larger. Find the maximum possible value of .
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
3
1 3
2 5
1 9
4
The optimal solution is to place the first flag at coordinate , the second flag at coordinate and the third flag at coordinate . The smallest distance between two of the flags is in this case.
5
2 2
2 2
2 2
2 2
2 2
0
There can be more than one flag at the same position.
22
93 6440
78 6647
862 11
8306 9689
798 99
801 521
188 206
6079 971
4559 209
50 94
92 6270
5403 560
803 83
1855 99
42 504
75 484
629 11
92 122
3359 37
28 16
648 14
11 269
17