-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
Input Format:
第一行输入两个值,第一个是图中顶点的个数,第二个是图中边的条数
第二行输入各顶点的信息,即输入每个顶点字符
第三行开始输入每条边,每条边的形式为两个顶点的序号,中间以空格隔开,输入完一条边换行
Output format:
首先输出图的顶点信息,输出完毕换行
接着输出图的邻接矩阵,假如图中有n个顶点,则输出形式为n行n列的邻接矩阵,输出完毕换行
接下来一行输出从图的第一个顶点开始进行深度优先遍历的序列,中间以空格隔开,输出完毕换行
最后一行输出从图的第一个顶点开始进行广度优先遍历的序列,中间以空格隔开,输出完毕换行
-Using an undirected graph adjacency matrix representation to complete the map creation, graph depth-first traversal, graph breadth-first traversal operation. In which vertex information is character, the graph vertex number by characters in order. The input sample used in the diagram are as follows:
Input Format:
The first line of input two values, the first one is the number of graph vertices, the second one is the number of graph edges
Second row, enter information in each vertex, that enter each vertex character
Start typing in the third line of each side, each side in the form of two vertices
- 2022-01-26 03:32:41下载
- 积分:1
-
一部很好的c++学习视频,讲得非常详细,透彻!适合c++初学者使用,学习!...
一部很好的c++学习视频,讲得非常详细,透彻!适合c++初学者使用,学习!-A very good c++ Learning video, was very detailed and thorough! Suitable for c++ Beginners use to learn!
- 2022-12-26 20:05:07下载
- 积分:1
-
Calcu_Sets
此程序计算的基本操作的一套理论在数学: 联盟两套、 两个集合的交集和一套补充。该程序运行在控制台中。
- 2022-08-21 22:17:10下载
- 积分:1
-
耗氧率处理器
针对工厂化养系统的溶解氧数据的采集,处理,分析,报告。
- 2022-01-26 05:00:36下载
- 积分:1
-
一个限定使用次数的例子,对于开发试用版本的windows应用程序有很大的参考价值...
一个限定使用次数的例子,对于开发试用版本的windows应用程序有很大的参考价值-use of a limited number of examples, for the development of beta version of windows applications have great reference value
- 2022-10-20 01:05:04下载
- 积分:1
-
这是一个单向链表的程序,可以增加,删除节点,运行调试通过.
这是一个单向链表的程序,可以增加,删除节点,运行调试通过.-This is a one-way linked list of procedures, can add, delete nodes, running through debugging.
- 2022-12-19 17:45:03下载
- 积分:1
-
wrk1.2
windows wrk1.2 微软为高校操作系统课程提供的可修改和跟踪的操作系统教学平台。它给出了Windows这个成功的商业操作系统的内核大部分代码,可以对其进行修改、编译,并且可以用这个内核启动Windows操作系统。可让学生将操作系统基本原理和商业操作系统内核联系起来,进一步加深对操作系统整体的理解
- 2022-03-05 04:14:47下载
- 积分:1
-
这是一本讲解wIn的一本比较好的电子书,看了内容后很多东西豁然开朗...
这是一本讲解wIn的一本比较好的电子书,看了内容后很多东西豁然开朗-This is a COM-to explain a relatively good book, having read the contents of a lot of things suddenly see the light
- 2023-01-27 16:55:05下载
- 积分:1
-
数据挖掘聚类方法
数据挖掘聚类方法,分为两个算法,测试集合有两个,分别为k-medoid算法和谱聚类算法,完整的java工程
- 2022-08-07 16:36:54下载
- 积分:1
-
tool to transfer from one directory to another
tool to transfer from one directory to another
- 2022-12-09 05:50:03下载
- 积分:1