POJ-1410——Intersection(简单计算几何,坑题)

该博客讨论的是如何判断一条线段是否与一个矩形相交的问题,其中矩形是实心的,线段在矩形内也视为相交。题目来自Southwestern European Regional Contest 1995。博客提到了判断过程中的注意事项,包括处理矩形点的输入顺序,并提供了相应的解决方案。

Intersection

Time Limit: 1000MS   Memory Limit: 10000K
Total Submissions: 17761   Accepted: 4556

Description

You are to write a program that has to decide whether a given line segment intersects a given rectangle. 

An example: 
line: start point: (4,9) 
end point: (11,2) 
rectangle: left-top: (1,5) 
right-bottom: (7,1) 

 
Figure 1: Line segment does not intersect rectangle 

The line is said to intersect the rectangle if the line and the rectangle have at least one point in common. The rectangle consists of four straight lines and the

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值