POJ - 1556 The Doors

You are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial and final points of the path are always (0, 5) and (10, 5). There will also be from 0 to 18 vertical walls inside the chamber, each with two doorways. The figure below illustrates such a chamber and also shows the path of minimal length. 
Input
The input data for the illustrated chamber would appear as follows. 


4 2 7 8 9 
7 3 4.5 6 7 

The first line contains the number of interior walls. Then there is a line for each such wall, containing five real numbers. The first number is the x coordinate of the wall (0 < x < 10), and the remaining four are the y coordinates of the ends of the doorways in that wall. The x coordinates of the walls are in increasing order, and within each line the y coordinates are in increasing order. The input file will contain at least one such set of data. The end of the data comes when the number of walls is -1. 
Output
The output should contain one line of output for each chamber. The line should contain the minimal path length rounded to two decimal places past the decimal point, and always showing the two decimal places past the decimal point. The line should contain no blanks.
Sample Input
1
5 4 6 7 8
2
4 2 7 8 9
7 3 4.5 6 7
-1
Sample Output
10.00

10.06

每个门都是两个点,加上出发点,和终点,这些点建立一个图求最短路。

而建边过程就是枚举任意两个点,如果这两个点之间没有其他线段,可以直达,那就连上。

如何判断没有其他线段呢,就是判断枚举的这两个点形成的线段和所有的墙壁是有存在交点即可。也就是线段与线段的交点问题

python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zip该项目是个人高分毕业设计项目源码,已获导师指导认可通过,都经过严格调试,确保可以运行!放心下载使用。python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zip该项目是个人高分毕业设计项目源码,已获导师指导认可通过,都经过严格调试,确保可以运行!放心下载使用。python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zip该项目是个人高分毕业设计项目源码,已获导师指导认可通过,都经过严格调试,确保可以运行!放心下载使用。python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zip该项目是个人高分毕业设计项目源码,已获导师指导认可通过,都经过严格调试,确保可以运行!放心下载使用。python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zip该项目是个人高分毕业设计项目源码,已获导师指导认可通过,都经过严格调试,确保可以运行!放心下载使用。python实现基于卷积神经网络的农作物病虫害python实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据+使用说明(毕业设计).zippython实现基于卷积神经网络的农作物病虫害识别源码+数据
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值