
dfs && bfs
Lyang0.0
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
G - The Debut Album (dfs)
Pop-group “Pink elephant” entered on recording their debut album. In fact they have only two songs: “My love” and “I miss you”, but each of them has a large number of remixes. The producer of the gro...原创 2019-08-08 09:13:37 · 148 阅读 · 0 评论 -
B - Neither shaken nor stirred (dfs)
The ACM ICPC regional contest in St. Petersburg is a stressful event even for veterans of competetive programming. That’s why for the last four years programmer Denchik and his coach Vova go to their ...原创 2019-08-08 09:30:07 · 175 阅读 · 0 评论 -
H - Fire! (bfs的应用)
Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help Joe escape the maze. Given Joe’s location in the ma...原创 2019-07-27 09:51:16 · 173 阅读 · 0 评论 -
K - Birthday Puzzle (遍历所有子集的位运算)
Today is the Birthday of a beautiful girl, she's happy and she's telling her friends loudly to bring her birthday gifts. One of her best friends who is fond of puzzles decided to bring her a very spec...原创 2019-07-26 14:37:29 · 376 阅读 · 0 评论 -
Hoppers (dfs)
You are part of an elite hacking group who has just invented a new type of malware, called the hoppers. Hoppers can operate in any high-security computer networks; however, they can only propagate the...原创 2019-05-03 20:38:43 · 424 阅读 · 0 评论 -
SDUT-Pots(简单搜索)
题目描述 You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i) empty the...原创 2019-01-18 09:52:23 · 251 阅读 · 0 评论 -
SDUT-深度优先搜索练习之神奇的矩环(简单搜索)
题目描述 小鑫的女朋友被魔王抢走了! 魔王留给小鑫一张n*m大的表,上面有各种各样的颜色,用A-Z这26个字母来表示。魔王留给他一个任务,如果小鑫可以在这张表中找出任意一个长度大于1的环,并且这个环的颜色是相同的,魔王就把小鑫的女朋友还给他。为了从魔王手中夺回他的女朋友,小鑫请你帮忙,你能帮帮他吗? 输入 多组输入。 每组的第一行有两个整数n,m。代表表的大小。 接下来是由A-Z的一些字母所构成的...原创 2019-01-17 14:45:56 · 186 阅读 · 0 评论 -
SDUT-团战可以输、提莫必须死(简单搜索bfs)
题目描述 为了一些你们不知道的原因,我们把LOL的地图抽象为一个n×m的矩阵 提莫积攒了k个蘑菇准备种到地图上去,因为提莫的背篓漏了,所以每一个提莫走过的地方都会被摆下一个蘑菇,两个蘑菇同时种在一个地方的话就会爆炸,所以一旦即将出现这种情况,提莫会直接传送回家,防止自己被炸死 之前的排位赛中因为乱种蘑菇提莫已经被骂了好多次了,所以这次提莫特地查资料对当前地图的各个位置种下蘑菇的价值做了统计,但是因...原创 2019-01-17 14:41:29 · 169 阅读 · 0 评论 -
SDUT-汤圆の拯救计划(简单搜索 dfs)
题目描述 又到了汤圆星球一年一度的汤圆节了,但是大魔王却过来把汤圆公主抓走了Σ( ° △ °|||)︴ 身为汤圆骑士的QAQ蒟蒻自然而然的肩负着拯救汤圆的使命 QAQ蒟蒻经历了千辛万苦(并没有)之后,来到了大魔王的城堡,根据情报,汤圆公主就被大魔王放在城堡内,然后QAQ蒟蒻发现自己是一个路 痴,所幸的是他拿到了大魔王的城堡的地图,而且在这上面标注了自己和汤圆公主的位置,那么问题来了,聪明的你能帮他...原创 2019-01-17 14:37:41 · 191 阅读 · 0 评论