-
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
-
A circular buffer implementations. VC6 MFC Test
一个环形缓冲区的实现方法.VC6 MFC 测试 -A circular buffer implementations. VC6 MFC Test
- 2023-04-30 07:05:03下载
- 积分:1
-
P2P 点对点传输客户端,java实现,包括源码和可执行代码
P2P 点对点传输客户端,java实现,包括源码和可执行代码 -P2P peer-to-client, java implementation, including source and executable code
- 2022-05-21 14:14:05下载
- 积分:1
-
Create Shortcut SourceCreate Shortcut Source
创建快捷方式 创建快捷方式 -Create Shortcut SourceCreate Shortcut Source
- 2023-05-23 14:10:03下载
- 积分:1
-
教务管理系统 帮组老师管理学生成绩,学籍档案
教务管理系统 帮组老师管理学生成绩,学籍档案-Educational management system to help teachers manage student performance groups, student files
- 2023-09-04 06:35:03下载
- 积分:1
-
DirectoryManagement project
DirectoryManagement project
- 2022-04-29 19:55:24下载
- 积分:1
-
可以用来捕捉信号,只要硬盘足够快,可以保持…
可以用来捕获信号,只要硬盘速度够快,要跟上一个值的采样率,那么就可以继续记录信号,一个值到硬盘空间。
- 2022-12-05 02:15:03下载
- 积分:1
-
Time and Attendance system, including databases, executable file, VC source, the...
考勤系统,包含数据库、可执行文件、VC源程序,系统提供了两种类型的用户-Time and Attendance system, including databases, executable file, VC source, the system provides two types of users
- 2023-02-03 00:40:03下载
- 积分:1
-
一个可以测试cmd命令的软件,使用起来十分方便
一个可以测试cmd命令的软件,使用起来十分方便-a software can test cmd command
- 2022-02-28 20:43:29下载
- 积分:1
-
模拟光纤中的交叉相位调制称为系统的非线性效应…
Simulates nonlinear effect in optical fiber called Cross Phase Modulation for symmetric regime
- 2023-08-07 09:30:03下载
- 积分:1