当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6097:Mindis

Special Judge 特殊评判
题目描述
The center coordinate of the circle C is O, the coordinate of O is (0,0) , and the radius is r.
P and Q are two points not outside the circle, and PO = QO.
You need to find a point D on the circle, which makes $PD + QD$ minimum.
Output minimum distance sum.
输入解释
The first line of the input gives the number of test cases T; T test cases follow.
Each case begins with one line with r : the radius of the circle C.
Next two line each line contains two integers x , y denotes the coordinate of P and Q.

Limits
$T \leq 500000$
$-100 \leq x , y \leq 100$
$1 \leq r \leq 100$
输出解释
For each case output one line denotes the answer.
The answer will be checked correct if its absolute or relative error doesn't exceed $10^{-6}$.
Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if $\frac{|a-b|}{max(1,b)} \leq 10^{-6}$.
输入样例
4
4
4 0
0 4
4
0 3
3 0
4
0 2
2 0
4
0 1
1 0
输出样例
5.6568543
5.6568543
5.8945030
6.7359174
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6097

最后修改于 2020-10-25T23:28:20+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 65536/65536K(Java/Others)