随笔分类 - 搜索-BFS
摘要:三、搜索题集整理 1、DFS Red and Black ★☆☆☆☆ FloodFill The Game ★☆☆☆☆ FloodFill Frogger ★☆☆☆☆ 二分枚举答案 + FloodFill Nearest Common Ancestors ★☆☆☆☆ 最近公共祖先 Robot Mot
阅读全文
摘要:E(2031): Barareh on Fire Submit Page Description The Barareh village is on fire due to the attack of the virtual enemy. Several places are already on
阅读全文
摘要:Description 如果无向图G每对顶点v和w都有从v到w的路径,那么称无向图G是连通的。现在给定一张无向图,判断它是否是连通的。 Input 第一行有2个整数n和m(0 < n,m < 1000000), 接下来m行每行有2个整数u,v (1<=u,v<=n)表示u和v有边连接。 Output
阅读全文
摘要:https://citel.bjtu.edu.cn/acm/oj/problem/1841 A QQ等级 Problem A. QQ等级 时间限制 1000 ms 内存限制 64 MB 题目描述 SonaXiao 以前对QQ等级特别在意,整天挂着QQ为了升等级,还经常和别人比等级高低。 QQ等级的规
阅读全文
摘要:时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld 题目描述 璐神现在有张n*m大小的地图,地图上标明了陆地(用"#"表示)和海洋(用"."表示),现在璐神要计算这张地图上岛屿的数量。 已知岛屿是由陆地的连通块组
阅读全文
摘要:poj-1321棋盘问题【bfs/回溯】 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 36385 Accepted: 17950 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要
阅读全文
摘要:Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and
阅读全文
摘要:There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two
阅读全文
摘要:There is an interesting calculator. It has 3 rows of buttons. Row 1: button 0, 1, 2, 3, ..., 9. Pressing each button appends that digit to the end of
阅读全文
摘要:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of
阅读全文
摘要:4月16日,日本熊本地区强震后,受灾严重的阿苏市一养猪场倒塌,幸运的是,猪圈里很多头猪依然坚强存活。当地15名消防员耗时一天解救围困的“猪坚强”。不过与在废墟中靠吃木炭饮雨水存活36天的中国汶川“猪坚强”相比,熊本的猪可没那么幸运,因为它们最终还是没能逃过被送往屠宰场的命运。 我们假设“猪坚强”被困
阅读全文
摘要:ACM小组的Samsara和Staginner对中国象棋特别感兴趣,尤其对马(可能是因为这个棋子的走法比较多吧)的使用进行深入研究。今天他们又在 构思一个古怪的棋局:假如Samsara只有一个马了,而Staginner又只剩下一个将,两个棋子都在棋盘的一边,马不能出这一半棋盘的范围,另外这 一半棋盘
阅读全文

浙公网安备 33010602011771号