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

建议使用的浏览器:

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

3995:Perfect Faceless Void

题目描述
DotA is a popular game now. There is a hero called Faceless Void (Darkterror,FV). The hero has a powerful skill called “Chronosphere”. This skill is described as follows: FV can create a Time Enchantment that neither the enemy units nor the friend units in it can move except FV himself. We can treat the Time Enchantment as a circle. Any unit which is in the circle or just on the edge of the circle can't move.

Now a new Crazy (Imba) version of the game has been issued. In the new version, FV can control the size of the Time Enchantment (the radius of the circle). More bigger the circle is, more mana(magic value, blue) FV costs. What's more, there is a new set about the unit which is just on the edge of the circle: if the unit is an enemy, it must remain stationary. Otherwise, the unit is free of the skill. Certainly, a unit in the circle must remain stationary whether it is an enemy or a friend.

Then come the problem, there are n (1 <= n <= 10000) enemy units and m (1 <= m <= 10000) friend units in the two dimensional plane, every unit can be treated as a point which is described by a coordinate (x,y). As a perfect player, FV must make sure that all the n enemy units are affected by the skill and all the m friend units are free of it. In additional, FV should choose a solution that cost least mana. How to set the center of the Time Enchantment and the radius of it? It is ensured that there always exists a solution.
输入解释
There are several test cases (about 50). The first line consists of two integers n and m (1<= n, m <= 10000) indicate the number of enemy units and the number of friend units. Then there are n+m lines, first n lines describe the coordinates of the n enemy units, and the last m lines describe the coordinates of the m friend units. Every line contains two real numbers.
输出解释
Output the best solution described above. The first line contains two real numbers indicate the coordinate of the center, the second line contains just one real number indicate the radius. The results are exact to 3 decimal places.
输入样例
2 1
0.0 0.0
2.0 0.0
1.0 2.0

2 1
0.0 0.0 
2.0 0.0
1.0 1.0

2 2
0.0 0.0
4.0 0.0
2.0 1.0
2.0 2.0
输出样例
1.000 0.000
1.000
1.000 0.000
1.000
2.000 -1.500
2.500
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-3995

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

共提交 0

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