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

建议使用的浏览器:

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

2950:Nuclear Plants

Special Judge 特殊评判
题目描述
The Great Plain of Algorithmia plays an extremely important role in the agriculture of the Bandulu Kingdom: this is the only place where barley (Hordeum vulgare), an essential ingredient of beer, can be produced. Unfortunately, it is not possible to grow barley on the full area of the plain, as several nuclear plants have recently been built, and you cannot grow barley near a nuclear plant (since you do not want to produce giant-size, aggressive, man-eating barley-mutants). Your task is to write a program that determines the size of the area that can be used for growing barley.

The Great Plain of Algorithmia is an n x m km2 rectangle, the coordinates of the four corners being (0, 0),(0, m),(n, 0) and (n, m) . There are two types of nuclear plants: small and large. You are not allowed to grow barley within 0.58km of a small nuclear plant or within 1.31km of a large nuclear plant.
输入解释
The input contains several blocks of test cases. Each block begins with a line containing four integers: 1 ≤ n, m ≤ 10000 describe the size of the plain, ks ≤ 100 is the number of small nuclear plants, and kl ≤ 100 is the number of large nuclear plants. The next ks lines describe the coordinates of the small nuclear plants, each line contains two integers 0 ≤ x ≤ n and 0 ≤ y ≤ m . The next kl lines describe the large nuclear plants in a similar fashion.

The input is terminated by a block with n = m = ks = kl = 0 .

输出解释
For each test case, you have to output a single line containing the area that can be used for growing barley. This number should be a real value with two digits of precision. To avoid rounding problems, we accept solutions with a maximum of ±0.01 error.

输入样例
10 10 2 2
2 2
4 4
5 6
1 8
10 10 1 0
5 5
0 0 0 0
输出样例
87.46
98.94

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Central Europe 2005

源链接: POJ-2950

最后修改于 2020-10-29T06:48:16+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536