Line of Sight
| Time Limit: 1000MS | Memory Limit: 30000K | |
| Total Submissions: 2634 | Accepted: 813 |
Description
An architect is very proud of his new home and wants to be sure it can be seen by people passing by his property line along the street. The property contains various trees, shrubs, hedges, and other obstructions that may block the view. For the purpose of this problem, model the house, property line, and obstructions as straight lines parallel to the x axis:
To satisfy the architect's need to know how visible the house is, you must write a program that accepts as input the locations of the house, property line, and surrounding obstructions and calculates the longest continuous portion of the property line from which the entire house can be seen, with no part blocked by any obstruction.
To satisfy the architect's need to know how visible the house is, you must write a program that accepts as input the locations of the house, property line, and surrounding obstructions and calculates the longest continuous portion of the property line from which the entire house can be seen, with no part blocked by any obstruction.

该博客详细解析了POJ 2074编程题,主要探讨如何计算直线与线段的交点,并判断两者是否相交,涉及输入输出处理、数据结构和几何算法。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



