登录
首页 » Windows开发 » Description: 采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...

Description: 采用邻接表表示有向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列,...

于 2022-01-28 发布 文件大小:1.53 kB
0 225
下载积分: 2 下载次数: 1

代码说明:

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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • graphics drawing MFC can painting dotted line
    图形学画图MFC实现 可以画点画线-graphics drawing MFC can painting dotted line
    2022-01-29 02:07:04下载
    积分:1
  • svm_alignment_0.7
    This the implementation of structural SVM for training complex alignment models for protein sequence alignment, especially for homology modeling. The structural SVM algorithm can incorporate many relevant features like secondary structure, relative exposed surface area, profiles and their various interaction into the alignment model. It was developed under Linux and compiles under gcc, built upon the svm^light software by Thorsten Joachims.
    2022-01-22 01:39:21下载
    积分:1
  • DUBAInterface金山毒霸式的页面圆码,很漂亮的
    DUBAInterface金山毒霸式的页面圆码,很漂亮的-Jinshan drug tyrants DUBAInterface page-style round keys, it is beautiful
    2023-05-23 00:35:03下载
    积分:1
  • window下的rsync 5.5.0最新版
    window下的rsync 5.5.0最新版跟rsync可双向同步哦!
    2022-05-21 20:40:00下载
    积分:1
  • 接触该样本
    Contactless Omnikey Sample
    2023-04-09 00:50:03下载
    积分:1
  • RS232串口通讯工具源码,VC++程序,方便监控,自动化等行业的应用。...
    RS232串口通讯工具源码,VC++程序,方便监控,自动化等行业的应用。-RS232 serial communication source, VC++ procedures for monitoring the application of automation and other industries.
    2022-04-06 17:56:07下载
    积分:1
  • 读取rinex文件的完整vc程序
    RINEX(接收机自主交换格式/接收机无关交换格式)是在GPS测量应用的标准数据格式常用。的格式使用的文本文件来存储数据,独立于制造商和接收机数据记录格式和具体模型你想读的RINEX files.this是一个项目塔可以帮助你做到这一点!试试吧!
    2022-03-02 09:24:25下载
    积分:1
  • 早上中午晚上杰弗里阿彻
    morning noon night by jeffery archer
    2022-01-21 02:49:12下载
    积分:1
  • C程序
    c program
    2022-05-19 08:38:56下载
    积分:1
  • 提取并保存EXE文件的图标
    提取并保存EXE文件的图标-extracting EXE file and preserve the icon
    2022-03-05 14:03:30下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载