文件名称:sy5
介绍说明--下载内容均来自于网络,请自行研究使用
一个旅行家想驾驶汽车从城市A到城市B(设出发时油箱是空的)。给定两个城市之间的距离dis、汽车油箱的容量c、每升汽油能行驶的距离d、沿途油站数n、油站i离出发点的距离d[i]以及该站每升汽油的价格p[i],i=1,2,…,n。设d[1]=0<d[2]<…<d[n]。要花最少的油费从城市A到城市B,在每个加油站应加多少油,最少花费为多少?-A traveler would like to drive a car from the city A to city B (located fuel tank is empty when starting). Given the distance between the two cities dis, automotive fuel tank capacity c, the distance per liter of gasoline to travel d, the number of petrol stations along the n, petrol station i the distance from the starting point d [i] and the liter of gasoline station Price p [i], i = 1,2, ..., n. Set d [1] = 0 <d[2]<…<d[n]。要花最少的油费从城市A到城市B,在每个加油站应加多少油,最少花费为多少?
(系统自动生成,下载前可以参看下载内容)
下载文件列表
sy5.cpp