题目描述
Problem Description
Kujira and Katsuo have decided to form a doubles pair and participate in a tennis tournament. They want to win their next match by completely returning all the opponent's balls, achieving a shutout. To do this, they have decided to calculate how hard they need to play.
For simplicity, the tennis court is represented by a single number line (meaning only lateral movement on their side of the court is considered, and vertical differences are ignored). Initially, at time $0$, both are standing at the origin. They can move or stay stationary at any time, with a maximum speed of $V$. Both have the same speed limit $V$, but otherwise, they can move independently. They can pass each other or be at the same position at the same time.
From now, $N$ balls will be coming. The $i$-th ball will arrive at position $X_i$ at time $T_i$. To return the $i$-th ball, at least one of them must be at position $X_i$ at time $T_i$. Find the minimum value of the speed limit $V$ so that both can return all the balls.
Input Format
The input is given from the standard input in the following format:
$ N $ $ T_1 $ $ X_1 $ $ T_2 $ $ X_2 $ $ : $ $ T_N $ $ X_N $
Output Format
Output the minimum value of the speed limit $V$ so that both can return all the balls. The answer will be considered correct if the absolute or relative error is at most $10^{−6}$.
Sample Input and Output
Sample Input #1
4
1 2
2 4
5 0
6 4
Sample Output #1
2.0000000000
Sample Input #2
5
1 3
2 -6
3 9
4 -12
5 15
Sample Output #2
3.0000000000
Sample Input #3
6
1 0
2 0
3 0
4 0
5 0
6 0
Sample Output #3
0.0000000000
Sample Input #4
3
1 0
3 5
5 0
Sample Output #4
1.6666666667
Sample Input #5
4
1 5
2 -10
4 0
5 -20
Sample Output #5
5.0000000000
Notes/Hints
Constraints
- All inputs are integers.
- $1\ ≦\ N\ ≦\ 10^5$
- $1\ ≦\ T_i\ ≦\ 10^9$
- $T_i\ <\ T_j$ when $i\ <\ j$
- $−10^6\ ≦\ X_i\ ≦\ 10^6$
Partial Points
- For $600$ points worth of test cases, $1\ ≦\ N\ ≦\ 2000$ is satisfied.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分