
广度搜索 bfs
文章平均质量分 71
不要再见
年轻且优秀,积极且颓废
展开
-
POJ - 3278 Catch That Cow
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 105691 Accepted: 33039DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediat...原创 2018-02-26 17:04:52 · 301 阅读 · 0 评论 -
POJ - 2251 Dungeon Master
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 41886 Accepted: 15859DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed o...原创 2018-02-26 17:32:23 · 303 阅读 · 0 评论 -
BFS和DFS算法原理(简单易懂+解题模板)
写在前面: 深度搜索dfs侧重于解决(求出符合题目要求的所有解法个数,联通块 )的问题。 与深度搜索dfs不同的是,广搜bfs旨在于找出最短的路径,最好的结果。 DFS 算法 思想:一直往深处走,直到找到解或者走不下去为止 BFS算法 DFS:使用栈保存未被检测的结点,结点按照深度优先的次序被访问并依次被压入栈中,并以相反的次序出栈进行新的检测。 BFS:使用队列保存未被...原创 2018-07-23 10:14:11 · 4730 阅读 · 2 评论 -
POJ - 3278 Catch That Cow
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 116403 Accepted: 36372 Description Farmer John has been informed of the location of a fugitive cow and wants to catch he...原创 2018-07-23 10:42:39 · 112 阅读 · 0 评论 -
POJ - 2251 Dungeon Master
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41886 Accepted: 15859 Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon ...原创 2018-07-23 10:47:04 · 121 阅读 · 0 评论 -
HDU - 1078 FatMouse and Cheese【动态规划 + 深度优先搜索】【两种代码】
FatMouse和奶酪 时间限制:2000/1000 MS(Java / Others)内存限制:65536/32768 K(Java /其他) 提交总数:14165接受提交内容:5987 问题描述 FatMouse在一个城市储存了一些奶酪。可以将城市视为维度为n的正方形网格:每个网格位置标记为(p,q),其中0 <= p <n且0 <= q <n。在每个网格位置,F...原创 2018-08-27 12:04:58 · 735 阅读 · 0 评论