Order to map any of the distance between two nodes, (2) with two
求图的任两结点间的距离,(2) 用二维数组存放C和A ,C是原成本矩阵,A 是求出的距离矩阵
(3) 算法采用三重循环,其中最外层的循环变量必须代表中间结点,中层的循环变量代表头结点而内层循环变量代表尾结点。
(4) 试着把三层循环变量的顺序作些改变,最外层的循环变量仍代表中间结点,而中层循环变量代表尾结点,内层循环变量代表头结点。把两种做法所得结果作比较,看结果是否相同
(5) 显示结果要清晰易懂
(6) 本题运行结果
-Order to map any of the distance between two nodes, (2) with two-dimensional array of storage C, A, C is the original cost matrix, A is to find the distance matrix (3) The algorithm uses the triple loop, one of the most outer loop variable must be representative of intermediate nodes, the middle loop variable represents the first node and the inner loop variable represents the end nodes. (4) tried to three-loop order of the variables to make some changes, the most outer loop variables still represent intermediate nodes, while the middle loop variable represents the end nodes, the inner loop variable represents the first node. The two approaches to compare the results to see whether the results the same (5) shows the results must be clear and understandable (6) The q
- 2022-04-20 12:55:19下载
- 积分:1
题目:参加运动会的N个学校编号为1~N.比赛分成M个男子项目和W个女子项目,项目编号分别为1~M和M+1~M+W.由于个项目参加人数差别较大,有些项目取前5名,...
题目:参加运动会的N个学校编号为1~N.比赛分成M个男子项目和W个女子项目,项目编号分别为1~M和M+1~M+W.由于个项目参加人数差别较大,有些项目取前5名,得分顺序为7,5,3,2,1 还有些项目只取前3名,得分顺序为5,3,2.写一个统计程序产生各种成绩单和得分报表.基本要求:产生各学校的成绩单,内容包括各校所取得的每项成绩的项目号,名次,姓名和得分 产生团体总分报表,内容包括校号,男子团体总分,女子团体总分和团体总分.概要设计:1. 为实现上述程序功能,应以线性表表示集合.2. 本程序包含3个模块:(1) 各集合定义模块(2) 线性表实现模块(3) 主程序模块-topics : participation in the Games N-school No. 1 ~ N. contestants were divided into men item M and W-woman project, a number of M and M ~ ~ 1 M W. As projects vary greatly in the number of participants, some of the items from the former five, scoring sequence of 7,5,3,2,1 also just take some items before the three scores sequence of incidents. write a variety of statistical procedures and report card scoring statements. the basic requirements : have the school report card, which includes school admission the results of each item, ranking names and scores scores statements groups, including schools, the men"s team scores, the women"s team scores and scores groups. summary of design : 1. to achi
- 2022-01-25 20:33:55下载
- 积分:1