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

建议使用的浏览器:

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

4855:Goddess

Special Judge 特殊评判
题目描述
Goddess used to be a good friend of Jitui, but Jitui has always been busy solving algorithm problems which makes Goddess very upset. In order to punish Jitui, Goddess will send N spaceships to attack Jitui’s LAB (Lost Algorithm Base). Jitui’s LAB is going to use laser weapons to destroy some of the spaceships.
The whole space can be seen as a two-dimensional coordinate system. Jitui’s LAB is a single point located at (0, 0). Each spaceship can be considered as a circle with center at (xi, yi) and radius ri. Laser weapon can be viewed as a ray starting from (0, 0), and in a direction chosen by Jitui. For each spaceship, the sum of length of segments that covered by the ray is the total damage made by the laser. Note that spaceships may overlap, which means the length that the laser weapon covers each spaceship may be calculated more than once. Jitui wants you to help him calculate the maximum damage he can make.
The number of spaceships N will not exceed 200. All centers of spaceships are guaranteed to be in the square with the left-down point at (-1000, -1000) and the right-up point at (1000, 1000). No spaceship will cover the point of (0, 0).
输入解释
There are several test cases. Please process till EOF.
For each case, the first line contains a number N that denotes the number of spaceships. Then next N lines, i-th line contains three numbers x, y, r denotes the coordinate of the center (x and y) and radius (r) of the i-th spaceship.
输出解释
For each case, output the maximized damage made by Jitui’s laser weapon.
Your output will be considered correct if within an absolute error less than 10-6.
输入样例
1
50 0 10
2
30 0 10
60 20 20
输出样例
20.0000000000
53.0366762251
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-4855

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

共提交 0

通过率 --%
时间上限 内存上限
20000/10000MS(Java/Others) 32768/32768K(Java/Others)