登录
首页 » 算法 » C程序小车加油

C程序小车加油

于 2022-02-06 发布 文件大小:1.31 kB
0 134
下载积分: 2 下载次数: 1

代码说明:

一个汽车加满油后可行驶n公里,由起点a到起点b为m公里。汽车出发时加满了油,途中设有k个加油站,d1是第一个加油站距起点的距离,di是第i个加油站距其前一个加油站的距离。设计一个算法,求出加油方案,使得加油次数最少即可到达终点。解决策略  汽车是由起点向终点行驶,现在面对的问题是应该在那个加油站加油,可使旅途过程中加油次数最少。为了解决该问题,我们可以规定在油箱中的油不足以使汽车行驶到下一个加油站的前提下,才加一次加油,如此   

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

发表评论

0 个回复

  • 一种边缘引导的图像插值,通过方向滤波和数据…
    An edge guided image interpolation algorithm via directional filtering and data fusion
    2023-03-18 13:05:03下载
    积分:1
  • 离散余弦变换与反变换
    图像压缩算法的一种,主要用于JPEG标准的图像压缩,是学习图像压缩必备技能。本源码采用C语言对图像数据进行DCT和IDCT变换,比较简单易懂,适合刚接触图像压缩算法的初学者。
    2022-07-03 18:35:52下载
    积分:1
  • 快速排序模板
    快速排序模板-Quick sort template
    2022-09-03 05:40:03下载
    积分:1
  • OFELI is an object oriented library of C++ classes for development of finite ele...
    OFELI is an object oriented library of C++ classes for development of finite element codes. Its main features are : * Various storage schemes of matrices (dense, sparse, skyline). * Direct methods of solution of linear systems of equations as well as various combinations of iterative solvers and preconditioners. * Shape functions of most "popular" finite elements * Element arrays of most popular problems (Heat Transfer, Fluid Flow, Solid Mechanics, Electromagnetics, ...).-OFELI is an object oriented library of C++ classes for development of finite element codes. Its main features are :* Various storage schemes of matrices (dense, sparse, skyline).* Direct methods of solution of linear systems of equations as well as various combinations of iterative solvers and preconditioners.* Shape functions of most "popular" finite elements* Element arrays of most popular problems (Heat Transfer, Fluid Flow, Solid Mechanics, Electromagnetics, ...).
    2022-02-27 06:26:31下载
    积分:1
  • kNN landsat
    KNN算法碳映射
    2022-03-13 15:07:39下载
    积分:1
  • C 字符串中的程序
    #include < stdio.h > #include < stdlib.h > int main) { char str [20] ; printf ("Digite uma stringn") ; setbuf(stdin,NULL) ; gets(str) ; int i; 为 (我 = 0 ; 我 < 4; i + +) { printf("%c",str[i]) ; } 返回 0 ; }
    2022-08-10 12:27:30下载
    积分:1
  • 该程序是用C语言写的采用了动量方的BP神经网络,它具有极其强大的扩展性,可用于函数的逼近及分类识别等各方面,语言书写规范,其中大量使用了动态分配一、二维数组的...
    该程序是用C语言写的采用了动量方法的BP神经网络,它具有极其强大的扩展性,可用于函数的逼近及分类识别等各方面,语言书写规范,其中大量使用了动态分配一、二维数组的方法,该网络实例中实现的是对某一函数的逼近,输入层为二层,中间层可自己设定多达十几层,逼近精度非常精确。读者可根据自己的需要设定各层的数目以及相应的训练样本进行训练与测试。-The program is written in C language using the momentum method of BP neural network, which has extremely powerful scalability, can be used for function approximation and classification in areas such as language specification, including large-scale use of a dynamically allocated one, two dimensional array of methods, examples of the network realize that the approximation of a function, for the second input layer, middle layer can be set as many as a dozen layers, close to very precise accuracy. Readers may need to be set in accordance with its own number of floors and the corresponding training samples for training and testing.
    2022-09-23 15:35:02下载
    积分:1
  • 我的串的连接实现
    我的串的连接算法实现-Series connectivity algorithm
    2022-01-22 08:08:05下载
    积分:1
  • 频繁子图挖掘GSPAN
    频繁子图挖掘算法GSPAN算法是经典的图挖掘算法,用c++编写实现,是很值得参考和学习的。
    2023-01-02 16:10:07下载
    积分:1
  • 数据结构第三版
    数据结构版第三版,课本习题和例题全面覆盖,减少编程的时间,可利用debug,逐步演算,增加理解
    2023-05-08 04:35:03下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载