-
Description:
采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...
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
- 2022-01-28 23:09:39下载
- 积分:1
-
把注册表自启动shell的键值改写ExAtmShell 快速,准确!
把注册表自启动shell的键值改写ExAtmShell 快速,准确!-put the registry since the launch of the keys rewritten shell ExAtmShell rapid and accurate!
- 2022-03-16 12:23:11下载
- 积分:1
-
This the pdf describing the 24C16 EEprom and how to interface it to the micro wo...
This the pdf describing the 24C16 EEprom and how to interface it to the micro world. I have used it for connecting to an AVR processor-This is the pdf describing the 24C16 EEprom and how to interface it to the micro world. I have used it for connecting to an AVR processor
- 2022-05-27 03:13:34下载
- 积分:1
-
锁定键盘与鼠标的源代码,c++/MFC
锁定键盘与鼠标的源代码,c++/MFC-lock the keyboard and mouse of the source code, c/MFC
- 2023-01-31 03:30:04下载
- 积分:1
-
a great and complex examples to explain the so
一个强大复杂的例子, 解释所谓Biorythms理论, 计算你的生物钟周期-a great and complex examples to explain the so-called Biorythms theory, calculating your clock cycle
- 2023-05-22 12:35:03下载
- 积分:1
-
电子温度计C语言程序代码
ds18b20的初始化、读写时序
数码管的显示程序...
电子温度计C语言程序代码
ds18b20的初始化、读写时序
数码管的显示程序-temperature measure
- 2022-10-06 01:45:03下载
- 积分:1
-
给出四个整数,找出24点解法,二进制状态枚举
给出四个整数,找出24点解法,二进制状态枚举-Give four integers, find the 24-point method, the binary status enumeration
- 2022-02-12 15:08:52下载
- 积分:1
-
VB 编写的自动清理IE上网后留下的网页缓存源码
VB 编写的自动清理IE上网后留下的网页缓存源码 -VB prepared to remove the IE Internet pages cache left by source
- 2023-03-07 04:40:04下载
- 积分:1
-
Internet phones plug
手机上网插件,还可以有其他用途,不错,大家-Internet phones plug-ins, but also can have other uses, yes, we
- 2022-09-16 07:50:03下载
- 积分:1
-
This is about UML intruction. So, you can refer to it to begin the UML desing.
这是关于UML的说明。因此,您可以参考它来开始UML设计。
- 2023-06-18 01:55:03下载
- 积分:1