DFS
文章平均质量分 88
hpuzsk
这个作者很懒,什么都没留下…
展开
-
Leetcode529. 扫雷游戏
529. 扫雷游戏难度中等130收藏分享切换为英文关注反馈让我们一起来玩扫雷游戏!给定一个代表游戏板的二维字符矩阵。'M'代表一个未挖出的地雷,'E'代表一个未挖出的空方块,'B'代表没有相邻(上,下,左,右,和所有4个对角线)地雷的已挖出的空白方块,数字('1' 到 '8')表示有多少地雷与这块已挖出的方块相邻,'X'则表示一个已挖出的地雷。现在给出在所有未挖出的方块中('M'或者'E')的下一个点击位置(行和列索引),根据以下规则,返回相应位置被点击后对应的面板:如果一个地...原创 2020-08-20 17:04:43 · 263 阅读 · 0 评论 -
杭电1978 How many ways
How many waysTime Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 11 Accepted Submission(s) : 5Problem Description这是一个简单的生存游戏,你控制一个机器原创 2016-03-22 18:00:58 · 443 阅读 · 0 评论 -
bzoj 1024 [SCOI2009]生日快乐
1024: [SCOI2009]生日快乐Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 1955 Solved: 1395[Submit][Status][Discuss]Descriptionwindy的生日到了,为了庆祝生日,他的朋友们帮他买了一个边长分别为 X 和 Y 的矩形蛋糕。现在包括windy,一共有 N 个人来分原创 2015-12-23 20:46:29 · 1007 阅读 · 0 评论 -
杭电1501 hdu1501 Zipper(深搜dfs)
ZipperTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8426 Accepted Submission(s): 2975Problem DescriptionGiven three strings, you are to determine whether the third string can be formed by原创 2015-11-27 20:42:31 · 422 阅读 · 0 评论 -
杭电1998 奇数阶魔方
奇数阶魔方Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3212 Accepted Submission(s): 1708Problem Description一个 n 阶方阵的元素是1,2,...,原创 2015-12-13 21:27:26 · 689 阅读 · 0 评论 -
杭电2592Counting Sheep dfs+bfs
Counting SheepTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2669 Accepted Submission(s): 1772Problem DescriptionA while ago原创 2015-12-12 19:26:26 · 509 阅读 · 0 评论 -
杭电1242Rescue(深搜)
RescueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22277 Accepted Submission(s): 7914Problem DescriptionAngel was caught b原创 2015-10-29 17:58:07 · 507 阅读 · 0 评论 -
zoj1091Knight Moves dfs+bfs+floyd
Knight MovesTime Limit: 2 Seconds Memory Limit: 65536 KBA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight mo原创 2015-10-29 15:45:12 · 1286 阅读 · 0 评论 -
poj3628Bookshelf 2
Bookshelf 2Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8618 Accepted: 3924DescriptionFarmer John recently bought another bookshelf for the cow libra原创 2015-09-19 16:31:19 · 512 阅读 · 0 评论 -
zoj1003Crashing Balloon
Crashing BalloonTime Limit: 2 Seconds Memory Limit: 65536 KBOn every June 1st, the Children's Day, there will be a game named "crashing balloon" on TV. The rule is very simple. On the原创 2015-08-05 20:14:24 · 441 阅读 · 0 评论 -
杭电1045(zoj1002)Fire Net
Fire NetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7905 Accepted Submission(s): 4499Problem DescriptionSuppose that we have原创 2015-08-04 18:48:30 · 832 阅读 · 0 评论 -
杭电1181变形课
变形课Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 18063 Accepted Submission(s): 6492Problem Description呃......变形课上Harry碰到了一原创 2015-08-05 14:47:40 · 520 阅读 · 0 评论 -
zoj 2100Seeding
SeedingTime Limit: 2 Seconds Memory Limit: 65536 KBIt is spring time and farmers have to plant seeds in the field. Tom has a nice field, which is a rectangle with n * m squares. There are原创 2015-08-04 20:14:49 · 517 阅读 · 0 评论 -
图的深度优先搜索(DFS)
图的深度优先搜索原创 2015-08-27 10:14:10 · 1845 阅读 · 0 评论 -
poj1562&&hdoj1241Oil Deposits
Oil DepositsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14613 Accepted: 7963DescriptionThe GeoSurvComp geologic survey company is responsible for de原创 2015-08-26 08:41:35 · 558 阅读 · 0 评论 -
poj2362Square
SquareTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 21988 Accepted: 7691DescriptionGiven a set of sticks of various lengths, is it possible to join th原创 2015-08-26 14:56:02 · 932 阅读 · 0 评论