-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
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
-
This is the sorce code in Visual Basic 6 for the future home, controlhome applia...
This the sorce code in Visual Basic 6 for the future home, controlhome appliances on time basis.-This is the sorce code in Visual Basic 6 for the future home, controlhome appliances on time basis.
- 2022-08-15 17:36:55下载
- 积分:1
-
ILSpy代码查看器,用于学习他人dll设计及代码构成
查看代码用的好工具,但是 经过特殊处理的代码,ilspy翻译过来的东西不容易人工去读懂。
想保存源代码,选择你要的dll 然后点菜单中的 “保存代码”。
- 2022-11-15 12:45:03下载
- 积分:1
-
程序中含有一些对控制台输出和事件进行控制的API函数.
程序中含有一些对控制台输出和事件进行控制的API函数.-Includeing some function to contral the input and output of console.
- 2022-12-29 23:20:03下载
- 积分:1
-
In this example program, a new TextCmd object is created for each character type...
In this example program, a new TextCmd object is created for each character typed.
- 2023-08-16 03:40:03下载
- 积分:1
-
WindowsXP的系统图标库,图标总数累计417个,可以丰富您的素材库,令您的用户界面更加赏心悦目。...
WindowsXP的系统图标库,图标总数累计417个,可以丰富您的素材库,令您的用户界面更加赏心悦目。-WindowsXP system icon library, icon cumulative total 417, you can enrich the material library, your user interface more pleasing to the eye.
- 2022-03-16 07:22:04下载
- 积分:1
-
用C#实现基于用C#实现基于TCP协议的网络通讯
用C#实现基于用C#实现基于TCP协议的网络通讯-C#-based C# TCP-based communications network
- 2023-05-10 23:55:03下载
- 积分:1
-
RSA Cryptosysten
在这个
- 2023-03-06 04:30:03下载
- 积分:1
-
tetrix is a easy game. i have many tetrixs.
tetrix is a easy game. i have many tetrixs.
- 2022-03-23 11:41:45下载
- 积分:1
-
商城源码,功能强大,适合个人网站商城建军站
商城源码,功能强大,适合个人网站商城建军站-shop online
- 2022-12-01 08:50:03下载
- 积分:1