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

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

于 2023-08-07 发布 文件大小:2.70 kB
0 225
下载积分: 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 个回复

  • contains common type of data structure and function
    包含常见的数据结构的类和函数-contains common type of data structure and function
    2022-07-04 09:29:52下载
    积分:1
  • float型而二叉树的创建及遍历
    #include #include struct BiTNode           //定义二叉树结构体 {   float data;   struct BiTNode *lchild;   struct BiTNode *rchild; }; //二叉树创建函数 struct BiTNode *CreateTree(float *preorder,float *inorder,int lenth) {     float *p,*q;      
    2022-12-24 11:10:03下载
    积分:1
  • 自己开发的b+树代码,经过本人测试,已经初步通过,有问题请联系我...
    自己开发的b+树代码,经过本人测试,已经初步通过,有问题请联系我-b own development code tree, after I test, it already passed, please contact the problems I
    2022-07-27 15:30:06下载
    积分:1
  • 回流焊监控系统
    回流焊监控系统-DCS,VB编写,对PLC进行通讯采集和控制,界面直观,操作方便,可以作为同类软件系统提供示范
    2022-01-27 14:41:41下载
    积分:1
  • B-树实现索引和快速查找-B-Tree indexing and quick search
    2022-03-05 00:10:43下载
    积分:1
  • 2.[问题描述] 编写递归算法,在二叉树中求位于先序序列中第K个位置的结点 [输入] 按照先序序列的顺序输入该结点的内容。其输入abd eh...
    2.[问题描述] 编写递归算法,在二叉树中求位于先序序列中第K个位置的结点 [输入] 按照先序序列的顺序输入该结点的内容。其输入abd eh cf i g 。输入要求的位置 [输出] 若二叉树不空,按先序序列输出,求出所求位置的结点 [存储结构] 采用二叉表存储 [算法的基本思想] 采用递归方法建立和遍历二叉树。首先建立二叉树的根结点,然后建立其左右子树,直到空子树为止,先序遍历二叉树时,先遍厉左子树,后遍厉右子树,最后访问根结点并计算出二叉树中叶子结点的数目和第K个位置的结点 #include #include struct node{ char info struct node*llink,*rlink } typedef struct node NODE -2. [Description of the issue] to prepare recursive algorithm, Binary for the first sequence sequence in the first position of the K-node [imported] in accordance with the first order input sequence in the order of the nodes content. Input abd eh i g cf. Import requirements of the position [output] if the binary tree is not empty, the first sequence by sequence output obtained by seeking the location of nodes [storage structure] Table 2 forks storage [algorithm for the basic idea] recursive method and Traversing binary tree. First established binary tree root node, and then to build t
    2022-06-02 16:30:44下载
    积分:1
  • pppppppppppppppppppppppppppppp
    这是一个停车场的模拟系统,在对数据结构栈与队列的熟悉及实现-pppppppppppppppppppppppppppppp
    2022-03-18 14:08:13下载
    积分:1
  • 各种数据整合,使用与各种数据库的整合,,各种数据整合
    各种数据整合,使用与各种数据库的整合,,各种数据整合-A variety of data integration, use and integration of various databases, a variety of data integration
    2022-03-10 02:06:46下载
    积分:1
  • 自创的算法,输入表达式,建立二叉树的程序,然后输出前缀中缀后缀表示法,利用的对表达式的分割与递归实现输入,同时这也是一个完整的波兰式转换程序,相当稳健...
    自创的算法,输入表达式,建立二叉树的程序,然后输出前缀中缀后缀表示法,利用的对表达式的分割与递归实现输入,同时这也是一个完整的波兰式转换程序,相当稳健-own algorithm, the importation of expression, the establishment of the binary tree and then output the suffix prefix which is made up of the method, using the right expression Segmentation and recursive input, and this was also a Polish integrity of the conversion process, sound
    2022-01-25 21:42:04下载
    积分:1
  • 运行环境必须在win9x环境下
    运行环境必须在win9x环境下-operating environment must win9x environment
    2022-10-18 03:35:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载