登录
首页 » Windows开发 » 采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...

采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...

于 2022-01-26 发布 文件大小:2.64 kB
0 273
下载积分: 2 下载次数: 2

代码说明:

采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示: Input Format: 第一行输入两个值,第一个是图中顶点的个数,第二个是图中边的条数 第二行输入各顶点的信息,即输入每个顶点字符 第三行开始输入每条边,每条边的形式为两个顶点的序号,中间以空格隔开,输入完一条边换行 Output format: 首先输出图的顶点信息,输出完毕换行 接着输出图的邻接矩阵,假如图中有n个顶点,则输出形式为n行n列的邻接矩阵,输出完毕换行 接下来一行输出从图的第一个顶点开始进行深度优先遍历的序列,中间以空格隔开,输出完毕换行 最后一行输出从图的第一个顶点开始进行广度优先遍历的序列,中间以空格隔开,输出完毕换行 -Using an undirected graph adjacency matrix representation to complete the map creation, graph depth-first traversal, graph breadth-first traversal operation. In which vertex information is character, the graph vertex number by characters in order. The input sample used in the diagram are as follows: Input Format: The first line of input two values, the first one is the number of graph vertices, the second one is the number of graph edges Second row, enter information in each vertex, that enter each vertex character Start typing in the third line of each side, each side in the form of two vertices

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

发表评论

0 个回复

  • 检查Windows Mobile系统上COM口的状况(可用的)
    检查Windows Mobile系统上COM口的状况(可用的)-Check the Windows Mobile system COM port status (available)
    2023-03-20 14:05:04下载
    积分:1
  • windows平台下DES加密类,VC++6.0环境编译
    windows平台下DES加密类,VC++6.0环境编译-DES encryption windows platform category, VC++6.0 compiler environment
    2022-02-22 06:30:38下载
    积分:1
  • 在表格中,您将满足条件的地址聚合多个单元格吨。
    在Excel中,将符合条件的多个单元格的地址汇总,生成公式,便于追溯到原始文件。-In Excel, you will meet the conditions of the address aggregate multiple cells to generate the formula, easy to be traced back to the original file.
    2022-10-07 06:05:03下载
    积分:1
  • “五子棋”这个程序是部分的,它是博弈树搜索…
    本“五子棋“程序只编写了人机对弈部分,运用了博弈树进行搜索,在选取最优的走步时使用极大极小分析法,考虑到搜索的时间复杂度和空间复杂度,在程序中只进行了2步搜索,即计算机在考虑下一步的走法时,只对玩家进行一步的推测。(程序中的棋盘规格为15*15)-" quintet game " this procedure is it is it partly , is it play chess tree search for to use to play chess while being man-machine to write only, use the great extremely small analytic approach while choosing the optimum walking, consider time complexity and space complexity searched for, only search for 2 steps in the procedure , namely the computer, while considering next walking in France,
    2022-01-22 11:03:50下载
    积分:1
  • c# 的 ping
    c#开发 的 ping-development ping
    2022-03-25 21:56:06下载
    积分:1
  • AnyQ是业务协同软件是由点石公司起诉,并…
      AnyQ是点石公司面向企业用户推出的一款商务协作软件,目的是商务协作、统一通讯,简称AnyQ。    Giga Information Group分析家Rob Enderle说:"对企业来说,即时通讯正演变成一种重要的技术,有助于集思广益并改善生产力。这将赋予企业绝佳的机会,在应用该技术的同时,将大大强化公司的竞争力"。    点石公司经过长期的市场调研、分析及技术积累,适时推出AnyQ这一产品。-AnyQ is a business cooperative software which is sued by Dianshi company, and the software is face to enterprise user, its goal is business cooperative, uniform communication, named AnyQ.Rob Enderle, the analysis reporter of Giga Information Group said that as far as enterprise is concerned instantly communication are evolved to an important technology, it can benefit to collect many good idea together and improve the productive power. This will vest the bestest opportunity to enterprise,when enterprises applying the technology it will strengthen the compepitive power of company meantime.Through a long time market investigation, analysis and technology acculation, Dianshi company issues the AnyQ production.
    2022-05-18 08:02:18下载
    积分:1
  • WINDOWS 2000中RUNDLL32.EXE原代码
    WINDOWS 2000中RUNDLL32.EXE原代码-the source code of WINDOWS 2000 RUNDLL32.EXE.rar
    2022-05-09 03:17:26下载
    积分:1
  • Multimedia player, can play video, pictures, music,
    MFC多媒体播放,能播放视频,图片,音乐-Multimedia player, can play video, pictures, music,
    2022-06-17 04:35:18下载
    积分:1
  • Change XP serial number. Zip to c hange XP serial number. Zip to change XP seria...
    Change XP serial number. Zip to c hange XP serial number. Zip to change XP serial number. Zip-Change XP serial number. Zip to change XP serial number. Zip to change XP serial number. Zip to change XP serial number. Zip
    2022-10-25 13:15:04下载
    积分:1
  • 一些文件WindowsCE的教程,对初学者很有帮助哦
    windowsCE的一些文档教程,对初学者很有帮助的哦-Some documents windowsCE tutorial, very helpful for beginners Oh
    2022-01-26 02:24:39下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载