-
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示...
采用邻接矩阵表示无向图,完成图的创建、图的深度优先遍历、图的广度优先遍历操作。其中图的顶点信息是字符型,图中顶点序号按字符顺序排列。本输入样例中所用的图如下所示:
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
- 2022-01-26 03:32:41下载
- 积分:1
-
一个简易日历程序,已知公元元年一月一日即耶稣诞生日是星期一,那么因为365%7=1,366%7=2。所以每过一年平年星期数加一,每过一年闰年星期数加二,依次类推...
一个简易日历程序,已知公元元年一月一日即耶稣诞生日是星期一,那么因为365%7=1,366%7=2。所以每过一年平年星期数加一,每过一年闰年星期数加二,依次类推就可以求出任意一年一月一日是星期几。-a simple calendar program, known Year on January 1 that the first year of the birth of Jesus Day is Monday, because 365% = 1,366 7% 7 = 2. So every non-leap year over year increase in a few weeks, a leap year every year the number increases two weeks, followed by analogy can be found arbitrary January 1, 2001 is several weeks.
- 2022-02-04 23:46:52下载
- 积分:1
-
基于MO进行地图打印的VB程序
基于MO进行地图打印的VB程序-MO-based maps for the VB Print
- 2022-07-10 03:34:08下载
- 积分:1
-
步进电机的c语言程序
步进电机的c语言程序-stepper motor c Language Program
- 2022-02-04 07:36:45下载
- 积分:1
-
验证码生成器
产生在C#中的随机验证码的图片。在简单的颜色产生的Captcha的瓯多种颜色。
- 2022-05-25 22:33:52下载
- 积分:1
-
汽车服务计费系统
- 2023-06-24 10:50:05下载
- 积分:1
-
按揭买房 计算器
按揭买房 计算器-Home mortgage calculator
- 2023-04-09 23:30:04下载
- 积分:1
-
巨魔是一个2D游戏/应用程序框架。它提供给你一些有趣的功能…
Troll is a 2D game/app framework. It provide to you some interting features that will help you write your game.
- Frame timing auto control (fixed FPS and low CPU usage)
- Primitives (circles, ellipse, rects, lines)
- Blit operations
- Blit with Alpha
- Input control (Keyboard, Mouse, etc)
- 2022-07-07 05:04:49下载
- 积分:1
-
贝塞尔curve.vb
bezier曲线.vb-bezier curve.vb
- 2022-07-16 07:55:28下载
- 积分:1
-
该文件是用来对窗体的打印 手表定理是指一个人有一只表时,可以知道现在是几点钟,而当他同时拥有两只表时却无法确定。两只表并不能告诉一个人更准确的时间,反而会让...
该文件是用来对窗体的打印 手表定理是指一个人有一只表时,可以知道现在是几点钟,而当他同时拥有两只表时却无法确定。两只表并不能告诉一个人更准确的时间,反而会让看表的人失去对准确时间的信心。你要做的就是选择其中较信赖的一只,尽力校准它,并以此作为你的标准,听从它的指引行事。记住尼采的话:“兄弟,如果你是幸运的,你只需有一种道德而不要贪多,这样,你过桥更容易些。” 如果每个人都“选择你所爱,爱你所选择”,无论成败都可以心安理得。然而,困扰很多人的是:他们被“两只表”弄得无所,心身交瘁,不知自己该信仰哪一个,还有人在环境、他人的压力下,违心选择了自己并不喜欢的道路,为此而郁郁终生,即使取得了受人瞩目的成就,也体会不到成功的快乐。 手表定理在企业经营管理方面给我们一种非常直观的启发,就是对同一个人或同一个组织的管理不能同时采用两种不同的方法,不能同时设置两个不同的目标。甚至每一个人不能由两个人来同时指挥,否则将使这个企业或这个人无所适从。手表定理所指的另一层含义在于每个人都不能同时挑选两种不同的价值观,否则,你的行为将陷于混乱。-the document was used to print the forms watches theorem refers to a person with a table, they can know it is a few minutes and when he has failed to Table 2 to determine. Table 2 does not tell a more accurate time, we would give people a look at the exact right time to lose confidence. You ought to do is to choose the more reliable one, and make every effort to calibrate it, and take it as your standard, and obey its guidelines. Remember Nietzsche"s words : "Brothers, if you are lucky, you only have a moral and
- 2022-11-20 21:00:03下载
- 积分:1