文件名称:lvguanyusuan
介绍说明--下载内容均来自于网络,请自行研究使用
设计用动态规划算法求解旅游预算问题的数据结构和递推程序。一个旅行社需要估算乘汽车从某城市到另一城市的最小费用,沿路有若干加油站,每个加油站收费不一定相同。旅游预算有如下规则:
若油箱的油过半,不停车加油,除非油箱中的油不可支持到下一站;每次加油时都加满;在一个加油站加油时,司机要花费2元买东西吃;司机不必为其他意外情况而准备额外的油;汽车开出时在起点加满油箱;计算精确到分(1元=100分)。编写程序估计实际行驶在某路线所需的最小费用。C++实现-Design algorithm travel budget data structures and recursive procedures using dynamic programming. Travel budget: a travel agency need to estimate the minimum cost by car one city to another city, along a number of stations, each station is not necessarily the same charges. Tourism budget the following rules apply: If the oil tank more than half of non-stop refueling, unless the oil tank can not support to the next are filled every refueling in a gas station, drivers should spend 2 yuan to buy things eat the driver does not have to prepare for other contingencies and extra oil the car out in the beginning fill the tank computing to the minutes (1 yuan = 100 points). Write a program to estimate the actual cost of a route with the minimum required. C++ achieve
若油箱的油过半,不停车加油,除非油箱中的油不可支持到下一站;每次加油时都加满;在一个加油站加油时,司机要花费2元买东西吃;司机不必为其他意外情况而准备额外的油;汽车开出时在起点加满油箱;计算精确到分(1元=100分)。编写程序估计实际行驶在某路线所需的最小费用。C++实现-Design algorithm travel budget data structures and recursive procedures using dynamic programming. Travel budget: a travel agency need to estimate the minimum cost by car one city to another city, along a number of stations, each station is not necessarily the same charges. Tourism budget the following rules apply: If the oil tank more than half of non-stop refueling, unless the oil tank can not support to the next are filled every refueling in a gas station, drivers should spend 2 yuan to buy things eat the driver does not have to prepare for other contingencies and extra oil the car out in the beginning fill the tank computing to the minutes (1 yuan = 100 points). Write a program to estimate the actual cost of a route with the minimum required. C++ achieve
(系统自动生成,下载前可以参看下载内容)
下载文件列表
lvguanyusuan.cpp