-
2 找出最大值
说明: c语言是很多编程软件的基础,找最大值,也是C语言运用中的一大关键因素(C language is the basis of many programming software, to find the maximum value, is also a key factor in the use of c language)
- 2020-06-21 12:00:02下载
- 积分:1
-
TSP
说明: Traveling Salesman Problem
市场上有很多种商品,旅行商 Shrek 做短期买卖赚取差价。他从一个城市购买一件商品,到达下一个相邻的城市就卖掉。如果这一次买卖无利可图,那么他就不会这么走。凭着自己和同伴多年的经验,他已经对地图上 n 个城市之间的差价了如指掌。两城市间可能有多种商品可赚取差价,此时 Shrek 只好倒卖利润最大的一件商品。
现在请你帮 Shrek 规划一条路线,使他能赚最多的钱。
输入
第一行两个整数 n、m。表示有 n 个城市,编号 1 ~ n
接下来有 m 行,每行三个整数 a、b、price,表示从城市 a 到城市 b 可赚取差价 price。
输出
若干空格分隔的整数,连成一条赚钱最多的路线。若有多条,输出字典序最小的那条路线(编号小的城市靠前的路线优先输出)
输入样例
4 4
2 1 5
1 3 3
3 4 1
1 4 5
输出样例
2 1 4(Traveling Salesman Problem)
- 2020-12-05 13:59:23下载
- 积分:1
-
数据结构与算法分析C++描述
说明: C++语言描述的数据结构与算法书籍资料,主要内容包含多种数据结构类型以及常见算法的原理和实现等(Data structure and algorithm described by C + + language)
- 2020-12-17 23:00:49下载
- 积分:1
-
CR17_2014.05.19_list
数据结构线性表教学笔记,内容讲基础知识,没基础可以看看(Linear table data structure teaching notes, basic knowledge content says, no base can take a look)
- 2014-06-09 23:35:37下载
- 积分:1
-
插入排序
说明: 根据所选定的字符顺序,按照从大到小的规则,对字符进行插入排序,(Insert and sort characters)
- 2020-06-22 12:40:01下载
- 积分:1
-
maze
迷宫求解一般采用“穷举法”,逐一沿顺时针方向查找相邻块(一共四块-东(右)、南(下),西(左)、北(上))是否可通,即该相邻块既是通道块,且不在当前路径上。用一个栈来记录已走过的路径栈是限定仅在表尾(top)进行插入或删除操作的线性表。(Maze solving generally use the " exhaustive" one by one to find adjacent blocks in a clockwise direction (a total of four- East (right), South (down), West (left), North (on)) whether to pass, that the both channel blocks adjacent blocks, and not in the current path. Use a stack to record the path traversed stack is limited only in the tail (top) to insert or delete a linear form.)
- 2013-12-13 17:55:45下载
- 积分:1
-
eightqueen
利用數據結構中的棧,實現19世紀著名數學家高斯提出的八皇后問題(Stack data structure, to achieve the eight queens problem of the 19th century, the famous mathematician Gauss)
- 2012-10-23 08:30:21下载
- 积分:1
-
第4章
清华大学出版社,数据结构简明教程李春葆著,第四章源文件(Tsinghua University press, a brief course on data structure, Li Chunbao, fourth chapters)
- 2018-02-03 14:39:12下载
- 积分:1
-
kalman_C
说明: 离散随机线性系统的卡尔曼滤波。
其中13lman.c是卡尔曼滤波函数,4rinv.c是滤波函数中用到的矩阵求逆函数,13lman0.c是主程序。(discrete stochastic linear Kalman filtering system. 13lman.c which is the Kalman filter function, 4rinv.c filtering function is used in the matrix inversion function, is the main program 13lman0.c.)
- 2006-03-01 19:20:13下载
- 积分:1
-
Mult
说明: 数据结构课上作业实现了一个多项式乘法的功能有注解(Job class data structure implements a polynomial function of multiplication comments)
- 2011-03-20 20:28:31下载
- 积分:1