登录
首页 » 数据结构 » 一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。对于给定的n和k个加油站位置,编程计算最少...

一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。对于给定的n和k个加油站位置,编程计算最少...

于 2023-08-07 发布 文件大小:2.70 kB
0 187
下载积分: 2 下载次数: 1

代码说明:

一辆汽车加满油后可行驶n公里。旅途中有若干个加油站。设计一个有效算法,指出应在哪些加油站停靠加油,使沿途加油次数最少。对于给定的n和k个加油站位置,编程计算最少加油次数。并证明算法能产生一个最优解-Fill up the car after driving an n km. There are a number of gas stations journey. Design an efficient algorithm that at which stations should stop to refuel along the way so that the least number of refueling. For a given n and k-station location, the calculation program for at least the number of refueling. And to prove that the algorithm can produce an optimal solution

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C++ Builder程序员学习第3章
    C++ Builder程序员学习数据结构第3章-Builder C programmers to learn data structure Chapter 3
    2022-03-16 16:07:27下载
    积分:1
  • 二叉树_先中后根显示_点信息查询_相似度比较等_附注释
    二叉树的一些基本实现:具备功能:创建、删除二叉树(包括文件读取录入信息),先中后根显示二叉树(递归算法),结点信息查询(包括:结点所在层数,结点孩子个数,结点在先中后根排序中的位置、寻到结点路径长度),二叉树相似度比较;附带注释,界面友好,代码是在VC6.0下写的。
    2022-07-10 18:06:05下载
    积分:1
  • Prim algorithm using minimum spanning tree of the experimental procedures used i...
    用prim算法实验最小生成树 本程序中用到函数adjg( ),此函数作用是通过接受输入的点数和边数,建立无向图。函数prg( )用于计算并输出无向图的邻接矩阵。函数prim( )则用PRIM算法来寻找无向图的最小生成树 定义了两个数组lowcost[max],closest[max],若顶点k加入U中,则令lowcost[k]=0。 定义二维数组g[ ][ ]来建立无向图的邻接矩阵。 -Prim algorithm using minimum spanning tree of the experimental procedures used in function adjg (), this function is through the acceptance of input points and edges, the establishment of a directed graph. Function of prg () used to calculate and output undirected graph of adjacency matrix. Function prim () is used PRIM Algorithm to find the undirected graph of the minimum spanning tree array defines two lowcost [max], closest [max], if it joined the U of k vertices, then the lowcost [k] = 0. The definition of two-dimensional array g [] [] to create a undirected graph of adjacency matrix.
    2022-03-16 20:21:07下载
    积分:1
  • wage management system with PB and SQL development, including an SQL code docume...
    工资管理系统用PB和SQL开发的,包含一个代码SQL文件和3个代码PB文件-wage management system with PB and SQL development, including an SQL code documents and three PB code documents
    2022-12-24 20:10:03下载
    积分:1
  • 基于的相关知识点,造的基排序
    基于数据结构的相关知识点,构造的基数排序-Knowledge-based data structure point of radix sort
    2022-09-30 17:50:03下载
    积分:1
  • CAI系统的源码
    数据结构CAI系统的源码-CAI data structure of the source system
    2022-02-05 20:43:35下载
    积分:1
  • A, JAVA Database (jar) version as jt400 want to help everyone to download. Rar a...
    一款、JAVA数据库(jar) 版本as jt400 希望对大家有所帮助 下载后把 .rar修改为.jar-A, JAVA Database (jar) version as jt400 want to help everyone to download. Rar amended to read. Jar
    2022-05-10 13:26:15下载
    积分:1
  • Zip database .Plaese use.
    有关zip的一个开发实例。主要包括图片和程序源代码。-Zip database .Plaese use.
    2022-02-05 22:01:37下载
    积分:1
  • Quote pillow good home Tianhong Steel Structure Warehouse Management System Ver...
    引用枕善居的天宏钢构仓库管理系统 Ver 2.96,给大家分享-Quote pillow good home Tianhong Steel Structure Warehouse Management System Ver 2.96, to the U.S. to share
    2022-05-18 22:01:24下载
    积分:1
  • 单链表的一些简单算法。
    单链表的一些简单算法。-some simple algorithm.
    2023-04-19 21:30:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载