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

建议使用的浏览器:

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

6617:Enveloping Convex

Special Judge 特殊评判
题目描述
You are given a convex polygon P and m points q1, q2, … qm.
You need to find the minimum enveloping convex Q which is homologous with convex P and every opposite side of two polygons are parallel. Here, minimum enveloping convex Q means that it contains m points q1, q2, …, qm (inside or on the border).
输入解释
The first line contains an integer T (<=30) denoting the number of test cases.
The first line of each test case contains an integer n (3 <= n <= 50000, sum of n overall test cases <= 100000) denoting the number of vertices of convex P.
Each of the next n lines contains two integers x and y denoting the coordinate of vertex Pi in clockwise or anticlockwise order. No 3 consecutive vertices lie in one line.
The next line contains an integer m (1 <= m <= 100000, sum of m overall test cases <= 300000) denoting the number of given points. Each of the next m lines contains the coordinate of point qi. Two points qi and qj (i != j) may have the same coordinates.
Absolute values of all coordinates are equal or less than 1000000.
输出解释
You must output minimum similitude ratio of convex Q to convex P.
Your answer will be considered correct if the absolute or relative error is less than 10-5.
输入样例
1
3
0 0
0 1
1 0
4
1 0
0 1
-1 0
0 -1
输出样例
3.0000000000

提示
来自杭电HDUOJ的附加信息
Recommend chendu

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

源链接: HDU-6617

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

共提交 0

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