随笔分类 -  搜索---BFS

摘要:题目链接:https://leetcode-cn.com/problems/number-of-islands/ 给定一个由 '1'(陆地)和 '0'(水)组成的的二维网格,计算岛屿的数量。一个岛被水包围,并且它是通过水平方向或垂直方向上相邻的陆地连接而成的。你可以假设网格的四个边均被水包围。 示例 阅读全文
posted @ 2020-03-12 23:53 wydxry 阅读(403) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.dotcpp.com/oj/problem1923.html 题目描述 学霸抢走了大家的作业,班长为了帮同学们找回作业,决定去找学霸决斗。但学霸为了不要别人打扰,住在一个城堡里,城堡外面是一个二维的格子迷宫,要进城堡必须得先通过迷宫。因为班长还有妹子要陪,磨刀不误砍 阅读全文
posted @ 2019-04-22 09:03 wydxry 阅读(327) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1372 Problem Description A friend of you is doing research on the Traveling Knight Problem (TKP) where 阅读全文
posted @ 2019-04-21 22:44 wydxry 阅读(173) 评论(0) 推荐(0) 编辑
摘要:题目链接:http://acm.fzu.edu.cn/problem.php?pid=2285 Problem 2285 迷宫寻宝 Accept: 323 Submit: 1247Time Limit: 1000 mSec Memory Limit : 32768 KB Accept: 323 Su 阅读全文
posted @ 2019-04-21 21:58 wydxry 阅读(407) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.dotcpp.com/oj/problem1672.html 问题 1672: 迷宫问题 时间限制: 1Sec 内存限制: 32MB 提交: 663 解决: 158 问题 1672: 迷宫问题 时间限制: 1Sec 内存限制: 32MB 提交: 663 解决: 15 阅读全文
posted @ 2019-04-21 21:21 wydxry 阅读(621) 评论(0) 推荐(0) 编辑
摘要:Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走 阅读全文
posted @ 2019-03-21 15:45 wydxry 阅读(306) 评论(0) 推荐(0) 编辑
摘要:The Robot Moving Institute is using a robot in their local store to transport different items. Of course the robot should spend only the minimum time 阅读全文
posted @ 2017-07-27 10:45 wydxry 阅读(374) 评论(0) 推荐(0) 编辑

Live2D