303652: CF706A. Beru-taxi
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Beru-taxi
题意翻译
**题意翻译** **题目描述** Vasiliy在点(a,b),他周围有n辆出租车,坐标在点(x,y),速度是v,假设Vasiliy已经知道了他最早能坐上哪辆出租车,请你求出他最早能坐上出租车的时间(出租车将直线朝Vasiliy行驶)。 **输入输出格式** **输入格式:** 第一行三个整数分别是Vasiliy的坐标a,b和出租车的数量n。 第二行到第n + 1行,每行有三个整数,分别是每辆出租车的坐标x,y和每辆出租车的速度v。 **输出格式:** 第一行一个浮点数,是Vasiliy最早能坐上出租车的时间,保留20位小数。题目描述
Vasiliy lives at point $ (a,b) $ of the coordinate plane. He is hurrying up to work so he wants to get out of his house as soon as possible. New app suggested $ n $ available Beru-taxi nearby. The $ i $ -th taxi is located at point $ (x_{i},y_{i}) $ and moves with a speed $ v_{i} $ . Consider that each of $ n $ drivers will move directly to Vasiliy and with a maximum possible speed. Compute the minimum time when Vasiliy will get in any of Beru-taxi cars.输入输出格式
输入格式
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 $ x_{i} $ , $ y_{i} $ and $ v_{i} $ ( $ -100<=x_{i},y_{i}<=100 $ , $ 1<=v_{i}<=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.
输出格式
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 ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF706A/259203790d90e969d73ec841bd0673c1e8e7d69a.png).
输入输出样例
输入样例 #1
0 0
2
2 0 1
0 2 2
输出样例 #1
1.00000000000000000000
输入样例 #2
1 3
3
3 3 2
-2 3 6
-2 7 10
输出样例 #2
0.50000000000000000000