-
Description:
采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...
Description:
采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,边的输入按照边的顶点序号从小到大的顺序排列,如下图的边的输入顺序为0 1,0 2,0 3,1 2,1 3,2 4,3 4共七条边,邻接表的边结点采用头插法。本输入样例中所用的图如下所示:
Input Format:
第一行输入两个值,第一个是图中顶点的个数,第二个是图中边的条数
第二行输入各顶点的信息,即输入每个顶点字符
第三行开始输入每条边,每条边的形式为两个顶点的序号,中间以空格隔开,输入完一条边换行
Output format:
首先输出图的顶点信息,输出完毕换行
接着输出图的邻接表,格式为首先输出第一个顶点,接着输出该顶点的所有的临界点的序号,换行,然后输出下一个顶点及邻接点,以此类推
接下来一行输出从图的第一个顶点开始进行深度优先遍历的序列,中间以空格隔开,输出完毕换行
最后一行输出从图的第一个顶点开始进行广度优先遍历的序列,中间以空格隔开,输出完毕换行
-Description:
Adjacency list using said directed graph to complete the map creation, map of the depth-first traversal, breadth-first graph traversal operations. In which vertex information is character, the graph vertices in order arranged by character number, while the input side of the vertex according to serial number from small to large order, the following graph of the input side of the order of 0 1,0 2,0 3,1 2,1 3,2 4,3 4 a total of seven edge, the edge-node adjacency list using the first interp
- 2022-01-28 23:09:39下载
- 积分:1
-
vfp利用dll回调函数写的windows service服务程序
vfp 无回调功能,利用外部DLL实现回调。根据Windows service规范实现了注册,注销,运行,停止这几个功能。让VFP程序也可以单独作为服务启动。现学现卖,不当之处请自行完善。
- 2023-05-30 06:00:03下载
- 积分:1
-
用户根据原理图进行电子元器件绘制,可以保存打开
用户根据原理图进行电子元器件绘制,可以保存打开-Users in accordance with the conduct of electronic components schematic drawing, can be preserved for open
- 2022-04-22 00:46:23下载
- 积分:1
-
统计某excel表中某些名字出现的次数
excel软件,用于统计大型excel表中,某些名字出现的次数
- 2022-05-19 06:55:34下载
- 积分:1
-
C语言经典50例1
C语言经典50例1-This file contains fifty classical source codes which are written in C programme language
- 2023-08-28 17:25:03下载
- 积分:1
-
A relatively simple game code.
一个比较简单得游戏代码,-A relatively simple game code.
- 2022-02-16 04:55:00下载
- 积分:1
-
工作日志安排情况
工作日志安排情况-diary arrangements
- 2022-02-01 08:24:26下载
- 积分:1
-
组合框的自绘,用的是DC呀,想画什么都可以。现在是以画一条直线为例,其它的可以类推了!...
组合框的自绘,用的是DC呀,想画什么都可以。现在是以画一条直线为例,其它的可以类推了!-portfolio drawn from the box, using a DC ah, wanted to paint anything can be. Now is painting a straight line as an example, the other could analogy!
- 2022-02-10 06:04:13下载
- 积分:1
-
实现数据结构中树的创建查询,删除和修改节点
实现数据结构中树的创建查询,删除和修改节点-the node of the tree in database can be created, queried, deleted and changed in this program.
- 2022-02-05 17:02:40下载
- 积分:1
-
To C++
以C++为基础的数据结构与算法研究生复习资料。-To C++-Based data structure and algorithm for post-graduate refresher information.
- 2022-01-28 14:15:38下载
- 积分:1