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

建议使用的浏览器:

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

2773:White Water Rafting

Special Judge 特殊评判
题目描述
You have been hired by a big theme park to design a new attraction: a white water rafting ride. You already designed the track; it is a round trip that is described by an inner and an outer polygon. The space in between the two polygons is the track.

You still need to design the rafts, however. It has been decided that they should be circular, so that they can spin freely along the track and increase the fun and excitement of the ride. Besides that, they should be as big as possible to fit the maximum number of people, but they can't be too big, for otherwise they would get stuck somewhere on the track.

What is the maximum radius of the rafts so that they can complete the track?
输入解释
On the first line one positive number: the number of testcases, at most 100. After that per testcase:

* One line with an integer ni (3 ≤ ni ≤ 100): the number of points of the inner polygon.
* ni lines with two integers each: the coordinates of the points of the inner polygon in consecutive order.
* One line with an integer no (3 ≤ no ≤ 100): the number of points of the outer polygon.
* no lines with two integers each: the coordinates of the points of the outer polygon in consecutive order.

All coordinates have absolute value no larger than 1000. The points of the polygons can be given in either clockwise or counterclockwise order and the two polygons do not intersect or touch themselves or each other. The outer polygon encloses the inner polygon.
输出解释
Per testcase:

* One line with a floating point number: the maximal radius of the white water rafts. This number must have a relative or absolute error less than 10-6.
输入样例
2
4
-5 -5
5 -5
5 5
-5 5
4
-10 -10
-10 10
10 10
10 -10
3
0 0
1 0
1 1
5
3 -3
3 3
-4 2
-1 -1
-2 -2
输出样例
2.5
0.70710678
来自杭电HDUOJ的附加信息
Recommend lcy

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

题目来源 NWERC 2008

源链接: HDU-2773

最后修改于 2020-10-25T22:56:37+00:00 由爬虫自动更新

共提交 0

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