登录
首页 » Windows开发 » Description: 采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...

Description: 采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...

于 2022-01-28 发布 文件大小:1.53 kB
0 278
下载积分: 2 下载次数: 1

代码说明:

Description: 采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,边的输入按照边的顶点序号从小到大的顺序排列,如下图的边的输入顺序为0 1,0 2,0 3,1 2,1 3,2 4,3 4共七条边,邻接表的边结点采用头插法。本输入样例中所用的图如下所示: Input Format: 第一行输入两个值,第一个是图中顶点的个数,第二个是图中边的条数 第二行输入各顶点的信息,即输入每个顶点字符 第三行开始输入每条边,每条边的形式为两个顶点的序号,中间以空格隔开,输入完一条边换行 Output format: 首先输出图的顶点信息,输出完毕换行 接着输出图的邻接表,格式为首先输出第一个顶点,接着输出该顶点的所有的临界点的序号,换行,然后输出下一个顶点及邻接点,以此类推 接下来一行输出从图的第一个顶点开始进行深度优先遍历的序列,中间以空格隔开,输出完毕换行 最后一行输出从图的第一个顶点开始进行广度优先遍历的序列,中间以空格隔开,输出完毕换行 -Description: Adjacency list using said directed graph to complete the map creation, map of the depth-first traversal, breadth-first graph traversal operations. In which vertex information is character, the graph vertices in order arranged by character number, while the input side of the vertex according to serial number from small to large order, the following graph of the input side of the order of 0 1,0 2,0 3,1 2,1 3,2 4,3 4 a total of seven edge, the edge-node adjacency list using the first interp

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

发表评论

0 个回复

  • very important book to learn about computers
    very important book to learn about computers-very important book to learn about computers...
    2023-08-11 22:10:03下载
    积分:1
  • C++开发测试程序
    C++开发测试程序-erwrddddddddddddddddddddddddddddddddddddddddddddddddddd
    2022-07-27 20:39:39下载
    积分:1
  • 利用VB实现的Chat程序
    利用VB实现的Chat程序-use of the VB chat program
    2022-07-11 09:37:21下载
    积分:1
  • tec条形码打印机控制示例,有一部尚在完美中
    tec条形码打印机控制示例,有一部尚在完美中-Edge bar code printers control sample, which a still perfect
    2022-08-16 13:18:29下载
    积分:1
  • This is a photo of a general purpose timer/ 在我们写的程序当中,总有一些配置信息需要保存下来,以便完成程序的功能,最...
    This is a photo of a general purpose timer/ 在我们写的程序当中,总有一些配置信息需要保存下来,以便完成程序的功能,最简单的办法就是将这些信息写入INI文件中,程序初始化时再读入.具体应用如下:counter card you can wirewrap in a weekend. It plugs into your PC s ISA bus just like a sound or modem card. It gives high-resolution timing (microseconds). Because of its programmablity, it is very powerful and flexible. You can even control DC or servo motors using pulse-width modulated (PWM), or stepper motors using its square wave capabilities. The figure below is the actual output (square wave) from the 8254 card captured by an oscilloscope: -This a photo of a general purpose timer. When we write program, There is always some configuration need to be saved, so that we can finish the function of the program.The most simple way is write these infomation to the INI file. It is read by the program during initialization,it is used as follows: counter card you can wirewrap in a weekend. It plugs into your PC s ISA bus just like a sound or modem card. It gives high-resolu
    2023-04-27 05:55:03下载
    积分:1
  • 局域网聊天工具源码
    本源码使用Qt开发的,主要实现局域网中相互之间聊天,实现TCP串口通讯功能,代码简单明了,注释详细,对于初学者具有很好的帮助。
    2022-08-09 07:39:31下载
    积分:1
  • 一款很实用的JAVA编程工具。。。。。。。。。。。。。我用了很久 效果很好...
    一款很实用的JAVA编程工具。。。。。。。。。。。。。我用了很久 效果很好-A useful Java programing tool. I have used it for a long time for its good effect.
    2022-07-11 22:26:21下载
    积分:1
  • 筛库 SET TALK OFF SELECT 街乡码,count(*) FROM aaa GROUP BY 街乡码 INTO ARRAY 街乡码库...
    筛库 SET TALK OFF SELECT 街乡码,count(*) FROM aaa GROUP BY 街乡码 INTO ARRAY 街乡码库 FOR i=1 TO _TALLY SELECT * FROM aaa WHERE aaa.街乡码 = 街乡码库[i,1] INTO TABLE ( 街乡 +街乡码库[i,1]) ENDFOR CLOSE DATABASES-Sieve library SET TALK OFF SELECT街乡code, count (*) FROM aaa GROUP BY街乡code INTO ARRAY街乡Code Library FOR i = 1 TO _TALLY SELECT* FROM aaa WHERE aaa.街乡Code =街乡code library [i , 1] INTO TABLE (街乡+街乡code libraries [i, 1]) ENDFOR CLOSE DATABASES
    2022-01-31 00:38:58下载
    积分:1
  • 在VC中如何将文件保存为EXCEL格式
    在VC中如何将文件保存为EXCEL格式-in VC how to save the file to Excel Format
    2022-03-18 11:44:07下载
    积分:1
  • 多CPU下的CPU曲线控制
    应用背景 针对于windows编程,多线程编程,CPU的如何使用以及分布,本程序根据编程之美上的的CPU曲线控制, 但是其针对的单CPU模型下,那么多CPU下该如何编程咧,控制不同CPU的曲线。 关键技术 关键技术主要用到了一些windows编程的技巧以及相关的库,比如windows一些测时间的函数,以及指定 绑定CPU和相关线程的函数,这些都是一些windows编程的技巧吧
    2022-02-28 20:21:31下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载