![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DFS&BFS
文章平均质量分 85
路兔兔123
博客已搬迁到http://www.cnblogs.com/cniwoq/ 今后不会再访问csdn
展开
-
BFS ZOJ problem-1671 Waking Ant
Walking AntTime Limit: 2 Seconds Memory Limit: 65536 KBAnts are quite diligent. They sometimes build their nests beneath flagstones.Here, an ant is walking in a rectangular area tiled w原创 2016-02-20 10:10:21 · 327 阅读 · 0 评论 -
HDU Problem 2612 Find a way 【BFS】
Find a wayTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10324 Accepted Submission(s): 3365Problem DescriptionPass a year le原创 2016-07-29 15:52:24 · 259 阅读 · 0 评论 -
UVA 11624 Fire!【BFS】
11624 - Fire!Time limit: 1.000 seconds原创 2016-07-29 18:14:32 · 210 阅读 · 0 评论 -
POJ Problem 1383 Labyrinth【树的直径】
LabyrinthTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 4196 Accepted: 1572DescriptionThe northern part of the Pyramid contains a very large and compli原创 2016-08-02 16:02:25 · 352 阅读 · 0 评论 -
HDU Problem 2196 Computer【树的直径】
ComputerTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5638 Accepted Submission(s): 2818Problem DescriptionA school bought t原创 2016-08-02 19:20:53 · 220 阅读 · 0 评论 -
Codeforces 29C Mail Stamps【离散化+DFS】
Mail Stampstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day Bob got a letter in an envelope. Bob kn原创 2016-08-18 19:42:59 · 480 阅读 · 0 评论 -
zzuli OJ 1908: 小火山的围棋梦想 【DFS】
1908: 小火山的围棋梦想Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 197 Solved: 46Description 小火山最近喜欢上了围棋。 对于围棋,其实小火山是一窍不通的。现在棋盘上,有很多小火山的棋子。 如果棋盘上有这样的一个位置, 那么这个位置也会变成小火山的棋子;这样的位置是指小火山的棋子原创 2016-08-10 19:02:29 · 539 阅读 · 0 评论 -
Codeforces 501C Misha and Forest【bfs+位运算】
C. Misha and Foresttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a forest as a non-directed原创 2016-09-29 19:50:23 · 242 阅读 · 0 评论 -
hdu - 4324 Triangle LOVE【dfs】
Triangle LOVETime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4610 Accepted Submission(s): 1809Problem DescriptionRecently, sc原创 2016-10-26 20:03:51 · 341 阅读 · 0 评论 -
hdu - Problem 1175 连连看 【bfs】
http://acm.hdu.edu.cn/showproblem.php?pid=1175Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 32089 Accepted Submission(s): 7900原创 2016-11-12 20:19:41 · 287 阅读 · 0 评论 -
hdu Problem 1242 Rescue bfs + 优先队列
问题地址RescueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24233 Accepted Submission(s): 8550Problem DescriptionAngel wa原创 2016-04-01 20:39:32 · 281 阅读 · 0 评论 -
POJ 1321 棋盘问题【DFS】
棋盘问题Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 35493 Accepted: 17485Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求原创 2016-07-29 08:46:21 · 227 阅读 · 0 评论 -
Problem 瞎子与瘸子的故事 bfs + 优先队列
问题 B:瞎子与瘸子的故事时间限制:1Sec 内存限制:128MB提交: 25 解决:6[提交][状态][讨论版]题目描述瞎子和瘸子两人共骑一辆摩托车,瞎子骑,瘸子看路,一路无事。转过一道弯,瘸子忽然发现路上有一道沟,连忙大声喊道:“沟!沟!沟!”瞎子一听来了劲,接着唱道:“啊涞,啊涞,啊涞……”结果瞎子和瘸子两人连人带车一起跌进沟内。上次的原创 2016-04-03 13:34:25 · 443 阅读 · 0 评论 -
杭电Problem-2717
Catch That CowTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10820 Accepted Submission(s): 3374Problem DescriptionFarmer John ha原创 2016-03-11 21:00:19 · 578 阅读 · 0 评论 -
杭电 1005 幸福指数
1005 数据已改,第一名的同学,你已经过了,抱歉。。幸福指数 Time Limit : 3000/1000ms (Java/Other) Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 563 Accepted Submission(s) : 320Font: Times New Roman原创 2016-03-26 16:45:25 · 607 阅读 · 0 评论 -
HDU Problem 1312 Red and Black 【DFS】
Red and BlackTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17430 Accepted Submission(s): 10577Problem DescriptionThere is a原创 2016-07-28 10:48:04 · 230 阅读 · 0 评论 -
POJ Problem 3620 Avoid The Lakes 【DFS】
Avoid The LakesTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7748 Accepted: 4092DescriptionFarmer John's farm was flooded in the most recent storm, a原创 2016-07-28 11:15:22 · 261 阅读 · 0 评论 -
HDU 1181 变形课 【DFS】
变形课Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 21263 Accepted Submission(s): 7666Problem Description呃......变形课上Harry碰到了一原创 2016-07-28 12:19:12 · 188 阅读 · 0 评论 -
HDU Problem 1241 Oil Deposits 【DFS】
Oil DepositsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24406 Accepted Submission(s): 14029Problem DescriptionThe GeoSurv原创 2016-07-28 14:59:32 · 185 阅读 · 0 评论 -
POJ Problem 2251 Dungeon Master 【BFS】
Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 26407 Accepted: 10275DescriptionYou are trapped in a 3D dungeon and need to find the quick原创 2016-07-28 19:33:24 · 212 阅读 · 0 评论 -
HDU Problem 2553 N皇后问题 【DFS】
N皇后问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 18289 Accepted Submission(s): 8267Problem Description在N*N的方格棋盘放置了N个皇后,使得原创 2016-07-28 21:10:20 · 187 阅读 · 0 评论 -
天梯赛5-12 愿天下有情人都是失散多年的兄妹 【dfs】
5-12 愿天下有情人都是失散多年的兄妹 (25分)呵呵。大家都知道五服以内不得通婚,即两个人最近的共同祖先如果在五代以内(即本人、父母、祖父母、曾祖父母、高祖父母)则不可通婚。本题就请你帮助一对有情人判断一下,他们究竟是否可以成婚?输入格式:输入第一行给出一个正整数N(2 \le≤ N \le 10^4≤104),随后N行,每行按以下格式给出一个人的原创 2017-03-23 22:00:30 · 1563 阅读 · 0 评论