-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
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
-
comprehensive nature of the display of the hotel and services. Hotel in...
全面的展示了宾馆自然情况和服务内容。
介绍宾馆信息,帮助客人了解宾馆相关信息。
为客户提供宾馆所在地旅游景点的详细信息。
向客户全面提供宾馆客房信息。
- comprehensive nature of the display of the hotel and services. Hotel information introduced to help visitors understand the hotel related information. hotel location to provide customers with detailed information on tourist attractions. to customers to provide comprehensive information on hotel rooms.
- 2022-02-03 06:32:57下载
- 积分:1
-
it will off the monitor after running the program and it will start again
it will off the monitor after running the program and it will start again
- 2022-03-23 03:35:59下载
- 积分:1
-
可以比较简单实现通信系统中BPSK算法,是其他算法的基础
可以比较简单实现通信系统中BPSK算法,是其他算法的基础-Can be relatively simple algorithm to achieve communication systems, BPSK, is the basis for other algorithms
- 2022-02-05 11:09:32下载
- 积分:1
-
一个用VB编的Block,便于初学者学习
和了解一些简单的算法
一个用VB编的Block,便于初学者学习
和了解一些简单的算法-One with the VB compiled Block, easy for beginners to learn and understand some simple algorithms
- 2023-04-25 02:30:02下载
- 积分:1
-
涉及:启动总线功能,总线功能结束,字节数据传输…
涉及:起动总线函数,结束总线函数,字节数据传送函数,字节数据接收函数,应答子函数-involved : Start Bus function, the end of bus functions, byte data transmission function, byte data reception function, Response Functions
- 2022-01-26 05:35:07下载
- 积分:1
-
C/C++教程,源程序实例,小而精好实用
C/C++教程,源程序实例,小而精好实用-C/C tutorial, example source, a small but good practical
- 2023-03-11 06:40:03下载
- 积分:1
-
vc++编程实例
vc++编程实例vc++编程实例vc++编程实例vc++编程实例vc++编程实例vc++编程实例vc++编程实例vc++编程实例vc++编程实例
- 2023-01-20 16:10:05下载
- 积分:1
-
search for IP addresses, opening a port of machinery. Single
搜索一段IP地址内,开放某个端口的机器。单线程搜索,有点慢。-search for IP addresses, opening a port of machinery. Single-threaded searching, a bit slow.
- 2022-02-28 17:49:36下载
- 积分:1
-
详细说明:rdpproxy for windows
详细说明:rdpproxy for windows 开发rdp代理的好例子,相信对你一定会大有帮助的
- 2022-08-23 13:39:06下载
- 积分:1