
bfs
文章平均质量分 81
lucky_vikey
这个作者很懒,什么都没留下…
展开
-
数据结构实验图论一:基于邻接矩阵的广度优先搜索遍历
数据结构实验图论一:基于邻接矩阵的广度优先搜索遍历 题目描述 给定一个无向连通图,顶点编号从0到n-1,用广度优先搜索(BFS)遍历,输出从某个顶点出发的遍历序列。(同一个结点的同层邻接点,节点编号小的优先遍历) 输入 输入第一行为整数n(0 对于每组数据,第一行是三个整数k,m,t(0<k<100,0<m<(k-1)*k/2,0< t<k),表示有m条边,k个顶点,原创 2014-11-29 17:11:45 · 728 阅读 · 0 评论 -
Catch That Cow
Catch That Cow 题目描述 Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow原创 2014-12-13 23:22:59 · 381 阅读 · 0 评论