-
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
-
波浪折射程序,By付桂。VB源码,海洋专业推荐一下,
波浪折射程序,By付桂。VB源码,海洋专业推荐一下,-By VB source, marine professionals recommend that Haha
- 2022-07-15 20:24:05下载
- 积分:1
-
VB实例源码,如有不妥之处请修改后通知再讨论一起来完善源码的上传....
VB实例源码,如有不妥之处请修改后通知再讨论一起来完善源码的上传.-Example VB source code, if the inadequacies of the revised notice, please discuss with one sound source upload.
- 2022-03-26 08:40:17下载
- 积分:1
-
个人财务管理系统,适合个人日常财务管理使用,基本功能已经具备。...
个人财务管理系统,适合个人日常财务管理使用,基本功能已经具备。-Personal financial management system, suitable for day-to-day financial management of personal use, the basic functions available.
- 2022-08-23 07:28:23下载
- 积分:1
-
如何获取GPS手机的位置信息,这个程序已严格通过测试,有此需要的朋友可以
如何获取GPS手机的位置信息,这个程序已严格通过测试,有此需要的朋友可以-How to obtain the phone
- 2022-03-25 07:44:45下载
- 积分:1
-
c++程序设计教材(第一版)的源码和答案
书中的例题和书后的练习题答案...
c++程序设计教材(第一版)的源码和答案
书中的例题和书后的练习题答案-c program design materials (first edition) of the source and the sample questions and answers to the book after book answers Exercises
- 2023-07-26 06:20:02下载
- 积分:1
-
一个MFC的简单学生成绩数据库管理系统,适合初学者参考。
一个MFC的简单学生成绩数据库管理系统,适合初学者参考。-A simple MFC database management system for student achievement
- 2022-01-25 15:22:54下载
- 积分:1
-
一个计算机的程序 自己写的 不太的好!
这个程序是对面向对象的应用,他主要是使用了相应的过载的概念,使得计算机能自动识别的浮点,及其他的东西,还有就是相应的...
一个计算机的程序 自己写的 不太的好!
这个程序是对面向对象的应用,他主要是使用了相应的过载的概念,使得计算机能自动识别的浮点,及其他的东西,还有就是相应的虚数,这个市最重要啊的 -a computer to write the procedures themselves are less good! The process of object-oriented applications, he mainly uses corresponding to the concept of overload, making the computer can automatically identify the float, and other things, there is the corresponding virtual few of the city"s most important ah
- 2022-03-10 10:31:38下载
- 积分:1
-
XNA编程
XNA3.1编程,移动的精灵,
C#2D编程的基础-xna programming
- 2022-08-18 19:39:24下载
- 积分:1
-
本代码类似于spy++,可以自动锁定窗口区域进行抓图,并具有保存功能。...
本代码类似于spy++,可以自动锁定窗口区域进行抓图,并具有保存功能。 -This code is similar to spy++, Can automatically lock the window to capture the region, with preservation of function.
- 2023-05-31 00:10:03下载
- 积分:1