-
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
-
week flight from chee teacher gamma radiation detector Monitoring Program (compi...
从周航慈老师的伽马辐射检测仪监控程序(汇编)改为c的程序-week flight from chee teacher gamma radiation detector Monitoring Program (compilation) to the procedure c
- 2023-07-18 09:40:02下载
- 积分:1
-
a very good intereger
flex皮肤,非常good,适合flex开发者-a very good intereger
- 2022-02-21 14:27:15下载
- 积分:1
-
这是一个实现电子签章的程序,在Visual C++6.0环境中编译通过,打开看看,一定会觉得很有意思:)...
这是一个实现电子签章的程序,在Visual C++6.0环境中编译通过,打开看看,一定会觉得很有意思:)-This is a realization of electronic signature procedure in the Visual C Compiler 6.0 environment through, open look, we will find it very interesting :)
- 2022-07-08 04:23:03下载
- 积分:1
-
基于背景相减的运动检测
用opencv做的运动目标检测,采用了背景相减的算法,此方法适用于背景变化不大的情况,效果较好,绘制外围绿色框,作为目标的跟踪,里面用到了图像灰度化、阈值化、图像膨胀与腐蚀、绘制边缘轮廓及外界矩形等相关知识,kernel的选择要注意把握好kernel的大小
- 2022-01-24 15:44:54下载
- 积分:1
-
高斯随机函数发生器,高人写的,我上传也是为了下载资源的。...
高斯随机函数发生器,高人写的,我上传也是为了下载资源的。-Gaussian random function generator, written by Gao Ren, I uploaded also to download the resources.
- 2023-03-26 04:00:03下载
- 积分:1
-
MFC技术内幕(配书源码CHAP09.rar
MFC技术内幕(配书源码CHAP09.rar-MFC Insider (book distribution source CHAP09.rar
- 2022-04-10 12:12:17下载
- 积分:1
-
This is a procedure used up all realize skin function API demo program, skin can...
这是一个全部用API实现程序换肤功能的演示程序,皮肤可以通过xml进行自定义-This is a procedure used up all realize skin function API demo program, skin can be customized xml
- 2022-06-28 06:29:29下载
- 积分:1
-
MCI' s application examples, including the play WAV, MIDI files and play the...
MCI的应用示例,包括播放WAV、MIDI文件和播放CD及将CD中的曲目转录为WAV文件等 -MCI" s application examples, including the play WAV, MIDI files and play the CD in the CD and the tracks transcribed into WAV files
- 2022-04-15 08:25:41下载
- 积分:1
-
用C写的表达式计算器,不但可以完成四则运算,还可以处理一些函数运算,可以配合graphviz画出表达式树和计算过程。...
用C写的表达式计算器,不但可以完成四则运算,还可以处理一些函数运算,可以配合graphviz画出表达式树和计算过程。-Written using C expression calculator, not only can complete the four operations, but also can deal with a number of functions computing, you can tie in with graphviz to draw the expression tree and calculation process.
- 2022-07-20 10:31:12下载
- 积分:1