
BFS
我要去看得最远的地方
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
NYOJ - 82 - 迷宫寻宝(一)(多次bfs)
题解:其实这个题和普通的bfs差不多主要对钥匙的处理如果到不了目的地,有可能是被门给挡住了,那么就去找钥匙 用bfs去走全图,一旦遇到宝藏就一切都结束,输出YES 如果走遍了全图还没有见到宝藏,那么一定是门或墙阻挡了你见到宝藏的道路,但你这一次开不了门,并不代表下一次你就开不了门,所以一旦这次bfs结束,你手中的钥匙有 增加,那么,在下一次bfs中,你或许就能打开门啦(也就是有找到宝藏的希望...原创 2018-08-31 21:57:22 · 279 阅读 · 0 评论 -
Prime Path(poj3126)
Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a...原创 2019-02-26 15:59:00 · 136 阅读 · 0 评论