-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
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
-
数字滤波器结构
数字信号处理中的数字滤波器结构程序代码
- 2023-01-05 21:00:04下载
- 积分:1
-
C++ to prepare the clips can achieve TXT file to read and display the function
C++编写的片断,可实现读取和显示TXT文档的功能-C++ to prepare the clips can achieve TXT file to read and display the function
- 2023-04-17 12:40:04下载
- 积分:1
-
特征码定位器可以根据机器码找到代码所在的内存地址,是定位CALL的好工具...
特征码定位器可以根据机器码找到代码所在的内存地址,是定位CALL的好工具-Signature locator can be found under the binary code where the memory address is the better instrument positioning CALL
- 2022-07-17 08:42:10下载
- 积分:1
-
半透明的窗口,很小,很容易使用,简单!
半透明窗口,短小精悍,使用方便,操作简单!
-translucent window, small and easy to use, simple!
- 2023-03-03 06:50:03下载
- 积分:1
-
操作系统课程设计, 操作系统课程设计.
操作系统课程设计, 操作系统课程设计.-Operating systems curriculum design, curriculum design the operating system.
- 2022-05-06 20:32:13下载
- 积分:1
-
一个画图软件,实现直线,曲线,画多边行等功能
一个画图软件,实现直线,曲线,画多边行等功能-A drawing software, to achieve a straight line, curve, line features such as multilateral painting
- 2023-05-30 06:25:02下载
- 积分:1
-
GuiToolkit的列子
GardenUI(免费,界面效果挺好的,XML,代码界面分离)
- 2022-08-25 08:19:22下载
- 积分:1
-
利用MFC库
实现数据结构二叉树的一个简单例子,除算法外,包含一些基本的算法结果显示,有助于了解掌握二叉树...
利用MFC库
实现数据结构二叉树的一个简单例子,除算法外,包含一些基本的算法结果显示,有助于了解掌握二叉树-The use of MFC library binary tree data structure to achieve a simple example, with the exception of algorithms, the algorithm contains some basic results showed that help understand binary tree
- 2023-03-29 17:15:03下载
- 积分:1
-
研究学习c++源程序集
研究学习c++源程序集-Studies c++ source Set
- 2022-03-04 15:34:19下载
- 积分:1