文件名称:pipe
- 所属分类:
- Windows编程
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- chenx******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
某石油公司计划建造一条由东向西的主输油管道。该管道要穿过一个有n 口油井的油
田。从每口油井都要有一条输油管道沿最短路经(或南或北)与主管道相连。如果给定n口油
井的位置,即它们的x 坐标(东西向)和y 坐标(南北向),应如何确定主管道的最优位置,
即使各油井到主管道之间的输油管道长度总和最小的位置?证明可在线性时间内确定主管道
的最优位置。
« 编程任务:
给定n 口油井的位置,编程计算各油井到主管道之间的输油管道最小长度总和。-An oil company plans to construct a east to west from the main pipeline. The pipeline to pass through an oil field n wells. Wells from each must have a pipeline along the shortest path (or South or North) connected with the competent Road. If given the location of oil wells in n, that is, their x coordinates (east-west) and y coordinates (north-south), should be how to determine the optimal position in charge of Road, even if the wells to the pipeline in charge of Road between the sum of the smallest length location? proved to be linear time to determine the optimal position in charge of Road. 芦Programming mission: to set the location of oil wells n, programmed to calculate the well-to-charge of Road between the length of the sum of the smallest oil pipeline.
田。从每口油井都要有一条输油管道沿最短路经(或南或北)与主管道相连。如果给定n口油
井的位置,即它们的x 坐标(东西向)和y 坐标(南北向),应如何确定主管道的最优位置,
即使各油井到主管道之间的输油管道长度总和最小的位置?证明可在线性时间内确定主管道
的最优位置。
« 编程任务:
给定n 口油井的位置,编程计算各油井到主管道之间的输油管道最小长度总和。-An oil company plans to construct a east to west from the main pipeline. The pipeline to pass through an oil field n wells. Wells from each must have a pipeline along the shortest path (or South or North) connected with the competent Road. If given the location of oil wells in n, that is, their x coordinates (east-west) and y coordinates (north-south), should be how to determine the optimal position in charge of Road, even if the wells to the pipeline in charge of Road between the sum of the smallest length location? proved to be linear time to determine the optimal position in charge of Road. 芦Programming mission: to set the location of oil wells n, programmed to calculate the well-to-charge of Road between the length of the sum of the smallest oil pipeline.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pipe.cpp