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

建议使用的浏览器:

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

3814:Signal Coverage

题目描述
GSM, Global System for Mobile Communications, is the world's most popular standard for mobile telephone systems. CMCC, China Mobile Communications Corporation, has almost 500,000 GSM base stations, but some cellphone users still complain about the signal coverage problem. Because of building block or some other reasons, we can assume that a base station covers an area of a simple polygon, and they don’t intersect with each other. We have a map that contains some simple polygons which represents the coverage of base stations. For the coverage ratio statistics, we drew a segment on the map, and we consider the C/L be the coverage ratio. C is the length of segment to be covered; L is the length of the segment we drew.
Please notice that, if a part of the segment can be considered as covered, that part must be inside or on the boundary of the polygon.
输入解释
The first line contains a single integer T, indicating the number of test cases.
Each test case begins with two coordinate, indicating the start and the end of the segment we drew. Then followed an integer, N, indicating there are N simple polygons. Each polygon starts with an integer, C, and C coordinates followed.

Technical Specification

1. 1 <= T <= 20
2. The number of all the points on the map is less than 100,000.
3. The coordinate of all the points consists of integers, and the value is in the range of [-100000, 100000]
输出解释
For each test case, output the case number first, then a coverage ratio with two decimal digits.
输入样例
2

0 0 2 0
1
4 0 0 1 0 1 1 0 1

0 0 2 0
1
4 0 -1 1 -1 1 1 0 1
输出样例
Case 1: 50.00%
Case 2: 50.00%
来自杭电HDUOJ的附加信息
Author momodi@WHU
Recommend lcy

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

源链接: HDU-3814

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

共提交 0

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