
基本算法--广度优先搜索
淼润淽涵
这个作者很懒,什么都没留下…
展开
-
DFS和BFS题型链接
【基本名词】 搜索:利用计算机的高性能来有目的的穷举一个问题解空间的部分或所有的可能情况,从而求出问题的解的一种方法。 特点:相比于单纯的枚举算法有了一定的方向性和目标性。 算法:在解的空间里,从一个状态转移到其他状态,这样进行下去,将解的空间中的状态遍历,找到答案。 状态:是对问题在某一时刻进展情况的数学描述,或者是数学抽象。 状态转移:问题从一个状态转...转载 2019-04-17 18:57:24 · 348 阅读 · 0 评论 -
POJ 1915 Knight Moves (BFS)
Problem DescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him?The ProblemYour t...原创 2019-04-26 18:14:18 · 184 阅读 · 0 评论 -
POJ 2251 Dungeon Master(BFS)
Problem DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move...原创 2019-04-26 20:14:19 · 138 阅读 · 0 评论 -
POJ 2312 Battle City(优先队列+bfs)
Problem DescriptionMany of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now.What we are discussing is a simple edition of this g...原创 2019-04-23 20:17:11 · 226 阅读 · 0 评论 -
HDU 2822 Dogs( BFS + 优先队列)
Problem DescriptionPrairie dog comes again! Someday one little prairie dog Tim wants to visit one of his friends on the farmland, but he is as lazy as his friend (who required Tim to come to his pl...原创 2019-04-24 21:52:39 · 184 阅读 · 0 评论