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

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

于 2022-01-26 发布 文件大小:2.64 kB
0 287
下载积分: 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 个回复

  • 一个显示文件不同的例子
    一个显示文件不同的例子-documents show a different example
    2022-03-03 06:08:45下载
    积分:1
  • a simple mouse hook
    一个最简单的鼠标钩子-a simple mouse hook
    2023-05-04 00:55:03下载
    积分:1
  • VFP代码录入小程序,小例子,大家看看,可能会有帮助,好了
    VFP代码录入小程序,小例子,大家看看,可能会有帮助,好了-VFP code entry procedures for small, small examples, we see that may be helpful, a good
    2022-10-11 21:00:03下载
    积分:1
  • 将bmp转换为include文件,用于嵌入式编程中
    将bmp转换为include文件,用于嵌入式编程中-will include conversion of documents for Embedded Programming
    2023-05-19 06:05:03下载
    积分:1
  • Video programming to capture surveillance video data, C/c++ program
    视频编程 捕获监控视频数据 C/c++程序-Video programming to capture surveillance video data, C/c++ program
    2023-02-17 11:50:04下载
    积分:1
  • 在大多数的窗口应用程序中,它的所有形式都是使用正规的时间…
    在绝大多数的Windows应用程序中,其窗体都是使用的正规正矩的矩形窗体,例如我们常用的,“记事本”,“扫雷”,等等。矩形窗体,具有编程实现简单,风格简洁的优点,所以在普通文档应用程序和 简单小游戏中使用足矣。但在某些娱乐游戏程序中使用就略显呆板些了,这时若用不规则窗体替代原先 的矩形窗体,将会使这类程序更添情趣。典型的例子有windows 自代的Media Player,新版本的Media Player有个控制面板的选项,选中这些面板,播放器就以选中的面板形状出现,这时的播放器比以前版 本的Media Player的古老矩形界面要生动有趣的多了。 要实现不规则窗体不是太难,知道了基本原理后,你也可以创建各种有趣的不规则窗体。-in most Windows applications, all of its forms is the use of the formal moments of rectangular windows, for example, we used, "Notepad", "mine" and so on. Rectangular windows, with programming simple, concise style of the advantages, in ordinary applications and files a simple little game that pledge to use. But in some amusement games procedures on the use of a slightly more rigid, then using the irregular forms of alternative original rectangular windows, such procedures will be added with more amenities. Typical examples are from the generation of the Windows Media Player, the new version of Media Player has a control panel of options, selected these
    2022-03-21 18:40:51下载
    积分:1
  • FP-树算法实现用C++语言来实现的,多多指教。-FP-tree algorithm using C++ language to achieve,Exhibitions.
    2022-06-29 07:38:33下载
    积分:1
  • Measured slant range of the operator to the Gauss projection plane side length o...
    将实测斜距化算至高斯投影平面边长的边长改正程序-Measured slant range of the operator to the Gauss projection plane side length of the side length correction procedure
    2023-05-04 13:45:03下载
    积分:1
  • 这是一个用VB实现的拷贝程序。
    这是一个用VB实现的拷贝程序。-This is a used copy of VB procedures.
    2022-01-29 02:42:56下载
    积分:1
  • 利用递归实现将当前目录下文件(包含文件夹下子目录)复制到指定目录下...
    利用递归实现将当前目录下文件(包含文件夹下子目录)复制到指定目录下-with recursion to realize copy files to another directory which is assigned by you
    2022-02-13 22:35:01下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载