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

建议使用的浏览器:

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

4785:Exhausted Robot

题目描述
  You want a tidy palace but you are too lazy to do the cleaning. As a result, your cousin Coach Pang gave you a cleaning robot. Unfortunately, the robot has some flaws and some furniture may hamper the cleaning.
  To simplify the problem, we consider all objects in a 2D-Plane. The room is viewed as a rectangle with edges parallel to the axis. Both robot and furniture are in shape of convex polygons.
  During the cleaning, the robot can move towards any direction (but only translation are permitted which means it cannot rotate). Although the robot has the ability to move through furniture, it can only do cleaning when it has no area outside the room or intersect with furniture. Besides, only one point can do the cleaning which is given as the first vertex of the robot in the input.
输入解释
  The first line of the input contains an integer T indicates the number of test cases.
  In the first line of each test case, there will be an integer n (0 <= n <= 20) and then (n + 1) blocks of data describing the objects. The first n blocks for furniture and the last one for the robot. All the vertices of an object are shown in corresponding block with counter-clockwise order. The first line of each block contains an integer m (3 <= m <= 20). Then m lines follow. In each line, there are two integers xi, yi indicating a vertex of the convex polygon.
�闍t the end of each set of data, there will be four integers in a line, xBL, yBL, xTR, yTR, indicates the coordinates of the bottom left corner and the top right corner of your room.
�闠he absolute value of all coordinates are within 103.
输出解释
  For each test case, output one line “Case #x: y”, where x is the case number (starting from 1) and y is size of the area that robot can clean, rounded to 3 digits after decimal point.
输入样例
2
1
4
3 3
4 3
4 4
3 4
4
1 1
2 1
2 2
1 2
0 0 10 10
0
4
1 1
2 1
2 2
1 2
0 0 10 10
输出样例
Case #1: 77.000
Case #2: 81.000
来自杭电HDUOJ的附加信息
Recommend

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

源链接: HDU-4785

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

共提交 0

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