Thanks_up昨天晚上熬夜休闲打CF,然后今天早上起晚了,这是真的惨啊
现在他要赶车去相亲,,
他所在的位置是坐标平面的点(a,b)。在他的app上面周围有n个出租车司机, 第i辆出租车位于(xi,yi)点,以vi的速度移动。
现在每个出租车司机都会以最快的速度朝Thanks_up那边开,请问Thanks_up会最快坐上哪辆出租车
The first line of the input contains two integers a and b ( - 100 ≤ a, b ≤ 100) — coordinates of Vasiliy's home.
The second line contains a single integer n (1 ≤ n ≤ 1000) — the number of available Beru-taxi cars nearby.
The i-th of the following n lines contains three integers xi, yi and vi ( - 100 ≤ xi, yi ≤ 100, 1 ≤ vi ≤ 100) — the coordinates of the i-th car and its speed.
It's allowed that several cars are located at the same point. Also, cars may be located at exactly the same point where Vasiliy lives.
第一行输入两个整数a and b ( - 100 ≤ a, b ≤ 100) ,代表Thanks_up的位置
第二行输入一个整数n (1 ≤ n ≤ 1000),附近出租车的数量
接下来有n行,每i行都要三个整数xi, yi and vi ( - 100 ≤ xi, yi ≤ 100, 1 ≤ vi ≤ 100) ,代表第i辆出租车的位置以及他的速度
允许一个点有多辆出租车,且出租车可能就在Thanks_up的位置
Print a single real value — the minimum time Vasiliy needs to get in any of the Beru-taxi cars. You answer will be considered correct if its absolute or relative error does not exceed 10 - 6.
Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if .
输出Thanks_up坐上出租车的最短时间,误差在10 - 6内即算做正确
0 0
2
2 0 1
0 2 2
1.00000000000000000000
1 3
3
3 3 2
-2 3 6
-2 7 10
0.50000000000000000000
NoteIn the first sample, first taxi will get to Vasiliy in time 2, and second will do this in time 1, therefore 1 is the answer.
In the second sample, cars 2 and 3 will arrive simultaneously.