-
a_linear_form_of_different_storage_structures
哈尔滨工业大学,计算机科学与技术学院,数据结构,作业二:实现线性表的不同存储结构(Harbin Institute of Technology, Computer Science and Technology, data structure, operating 2: To achieve a linear form of different storage structures)
- 2009-10-29 21:09:11下载
- 积分: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
-
yuesehuhuan
就是一个简单的约瑟夫环实现程序。主要就是在痛过程序实现栈的实现。(Joseph is a simple procedure to achieve ring. The main program is in pain over the realization of the realization of the stack.)
- 2007-11-22 11:35:10下载
- 积分:1
-
sgu-499
题意:给你n个数,求出两两组合的最大公约数
类似打素数表的做法
(Meaning of the questions: to give you the number n, find greatest common divisor of a similar combination twenty-two hit the practice table of prime numbers)
- 2011-08-30 21:56:59下载
- 积分:1
-
erchashu
平衡二叉树操作,可以输入数字形成二叉树,可以进行添加、删除操作(Balanced binary tree operation, you can enter numbers to form a binary tree, the user can add, delete)
- 2011-12-23 10:26:26下载
- 积分:1
-
CarClass
数据结构简单的课程设计交通换乘算法,里面有零次换乘与一次换乘(Simple structure, curriculum design data traffic transfer algorithm, which have zero time transfer and a transfer)
- 2011-01-09 10:33:14下载
- 积分:1
-
FinalExam
C语言期末考试题,含答案。数组、链表、函数等的使用和C编程。(failed to translate)
- 2011-11-07 20:07:25下载
- 积分:1
-
Circlist_Josephus3_4
循环链表的应用
循环链表的应用
很方便的实现(cycle Chain cyclic chain of convenience Implementation)
- 2006-11-23 19:36:47下载
- 积分:1
-
jhgrerfgjz
一个简单的求矩阵求逆的c语言算法
一个简单的求矩阵求逆的c语言算法
一个简单的求矩阵求逆的c语言算法(a simple matrix inversion for the C language algorithms for a simple matrix inversion of the c language a simple algorithm The matrix inversion for the C language algorithms for a simple matrix inversion algorithm in C Language)
- 2021-03-29 11:39:11下载
- 积分:1
-
errormodeling
轨迹误差建模的多轴联动机床轮廓误差补偿技术(Contour Error Compensation Technology for Multi- Axis Linkage Machine Based on Trajectory Error Modeling.)
- 2017-05-28 15:39:27下载
- 积分:1