-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
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
-
串口函数
vc串口通讯函数,已经包装好,可以直接用,
- 2023-02-07 13:35:04下载
- 积分:1
-
自己写的一个java练习程序,可以根据输入的单词,查找出可能存在的词根。...
自己写的一个java练习程序,可以根据输入的单词,查找出可能存在的词根。-Write a java practice their own program based on the input word to find out the possible existence of root.
- 2022-06-19 22:43:03下载
- 积分:1
-
V/F转换芯片VFC32驱动源代码,VFC32是高精度伏频转换芯片,该代码已多次试用,正确可靠...
V/F转换芯片VFC32驱动源代码,VFC32是高精度伏频转换芯片,该代码已多次试用,正确可靠 -V/F converter chip VFC32 driver source code, VFC32 is a high-precision V-frequency conversion chip, the code has been repeatedly tested, accurate and reliable
- 2022-01-26 00:21:52下载
- 积分:1
-
用c++实现的一个礼花的模拟程序,很短的代码。dos界面下的。...
用c++实现的一个礼花的模拟程序,很短的代码。dos界面下的。-achieved with a fireworks simulation procedures, in a very short code. Under the dos interface.
- 2022-04-09 17:03:22下载
- 积分:1
-
在易语言安装
用易语言做安装文件-language with easy installation
- 2023-04-20 16:15:05下载
- 积分:1
-
一个可视化的学生基本信息管理系统,可以输入学生姓名,ID,性别,年龄等相关资料并保存,查询,删除,修改等...
一个可视化的学生基本信息管理系统,可以输入学生姓名,ID,性别,年龄等相关资料并保存,查询,删除,修改等-a visual basic student information management system, students can enter the name, ID, gender, age and other relevant information such as preservation, inquiries, deletion, modification, etc.
- 2023-09-01 19:45:04下载
- 积分:1
-
teach fresh with logo designing step by step.
please download and make use of i...
手把手教你做LOGO 菜鸟教学 欢迎下载并使用-teach fresh with logo designing step by step.
please download and make use of it.
- 2022-08-11 20:28:26下载
- 积分:1
-
Use MFC to do the color set tool. You can learn the RGB and MFC coding.
Use MFC to do the color set tool. You can learn the RGB and MFC coding.
- 2022-03-11 17:02:34下载
- 积分:1
-
Vector Sprite Control
Vector Sprite Control
- 2022-08-05 20:35:56下载
- 积分:1