程序员人生 网站导航

UVA 10652 Board Wrapping 计算几何

栏目:互联网时间:2014-11-08 08:16:40


多边形凸包。。。。


Board Wrapping
Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu

Submit Status

Description

Download as PDF

Problem B

Board Wrapping

Input: standard input
Output: standard output

Time Limit: 2 seconds


The small sawmill in Mission, British Columbia, has developed a brand new way of packaging boards for drying. By fixating the boards in special moulds, the board can dry efficiently in a drying room.

Space is an issue though. The boards cannot be too close, because then the drying will be too slow. On the other hand, one wants to use the drying room efficiently.

Looking at it from a 2-D perspective, your task is to calculate the fraction between the space occupied by the boards to the total space occupied by the mould. Now, the mould is surrounded by an aluminium frame of negligible thickness, following the hull of the boards' corners tightly. The space occupied by the mould would thus be the interior of the frame.

 

 

 

Input

On the first line of input there is one integer, N <= 50, giving the number of test cases (moulds) in the input. After this line, N test cases follow. Each test case starts with a line containing one integer n1< n <= 600, which is the number of boards in the mould. Then n lines follow, each with five floating point numbers x, y, w, h, j where 0 <= x, y, w, h <=10000 and 

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐

1.cyou 非常适合 Z 世代企业家的三大理由 2阿里、京东类ChatGPT产品正在内测 未来或将融入产品 3公会积极复工复产,2023直播行业有哪些新机遇? 4第三届OpenHarmony技术大会展区亮点纷呈,全方位洞见智慧互联未来 5第三届OpenHarmony技术大会应用生态实践分论坛成功举办 6第三届OpenHarmony技术大会OS安全分论坛圆满举办 7第三届 OpenHarmony 技术大会:创新成果丰硕,共筑开源生态新未来