-
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
-
英语停字班。它有助于判断你的字词或不..
A English Stop word class. It helps to check whether your word is stopword or not.
- 2022-06-17 06:04:00下载
- 积分:1
-
说多功能刀 afah gadfhgadrh sh whj
说多功能刀 afah gadfhgadrh sh whj-son of bitch shite stupid gadhwtrjjjeh agkngn fgahoahiao gadhojh re gjoasdir a gji
- 2022-09-22 21:00:03下载
- 积分:1
-
XML解析器,可以查错和编辑,使用vc编的,用了msxml.h
XML解析器,可以查错和编辑,使用vc编的,用了msxml.h-XML parser can troubleshoot and editors, the use of vc series with the msxml.h
- 2023-02-22 14:30:04下载
- 积分:1
-
结构有限元分析源程序,用FORTRAN90编写,主要用于结构分析。...
结构有限元分析源程序,用FORTRAN90编写,主要用于结构分析。-Finite Element Analysis source with FORTRAN90 preparation, mainly for structural analysis.
- 2022-01-30 15:29:42下载
- 积分:1
-
用于实现JAVA树结构的BEAN
用于实现JAVA树结构的BEAN-used to achieve the tree structure of the Java Beans
- 2022-02-04 01:53:14下载
- 积分:1
-
这是一个关于数据结构中约瑟夫环的程序,不用我说只要是上过这门课的同学就应该知道他的用处了。...
这是一个关于数据结构中约瑟夫环的程序,不用我说只要是上过这门课的同学就应该知道他的用处了。-This is a data structure on Josephus procedures, as long as I do not have to say yes on this course students should know his useless.
- 2022-03-05 07:13:17下载
- 积分:1
-
使用XML编写的通讯薄
使用XML编写的通讯薄-prepared by the use of XML communications thin
- 2022-03-24 23:21:19下载
- 积分:1
-
操作系统实验 分页式存储管理
操作系统实验 分页式存储管理-experimental operating system paging storage management
- 2022-06-20 02:26:59下载
- 积分:1
-
定时保护视力小工具,适用于长期用电脑者
定时保护视力小工具,适用于长期用电脑者-regular eyecare small tools, applicable to long-term use of computers
- 2023-02-13 04:00:03下载
- 积分:1