随笔分类 -  BFS

摘要:学习博客:戳这里 附本人代码: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn = 2e3 + 10; 5 const ll mod = 998244353; 6 c 阅读全文
posted @ 2018-11-04 11:22 euzmin 阅读(177) 评论(0) 推荐(0)
摘要:一门武功能否传承久远并被发扬光大,是要看缘分的。一般来说,师傅传授给徒弟的武功总要打个折扣,于是越往后传,弟子们的功夫就越弱…… 直到某一支的某一代突然出现一个天分特别高的弟子(或者是吃到了灵丹、挖到了特别的秘笈),会将功夫的威力一下子放大N倍 —— 我们称这种弟子为“得道者”。 这里我们来考察某一 阅读全文
posted @ 2018-03-11 14:24 euzmin 阅读(394) 评论(0) 推荐(0)
摘要:L2-016. 愿天下有情人都是失散多年的兄妹 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 时间限制 200 ms 时间限制 200 ms 内存限制 65536 kB 内存限制 65536 kB 代码长度限制 8000 B 阅读全文
posted @ 2018-03-05 23:30 euzmin 阅读(447) 评论(0) 推荐(0)
摘要:E. Connected Components? time limit per test 2 seconds time limit per test memory limit per test 256 megabytes memory limit per test input standard in 阅读全文
posted @ 2018-02-07 18:37 euzmin 阅读(260) 评论(0) 推荐(0)
摘要:For a group of people, there is an idea that everyone is equals to or less than 6 steps away from any other person in the group, by way of introductio 阅读全文
posted @ 2018-01-22 22:56 euzmin 阅读(370) 评论(0) 推荐(0)
摘要:1280: 诡异的迷宫 题目描述 Simple最近刷题(打游戏)刷多了,一觉醒来发现自己到了一个迷宫里,怎么也出不去了。这时传来了一句话,告诉Simple必须按顺序收集完所有的宝石,才能出迷宫。所谓的顺序,就是按照每块宝石上英文字母的顺序。迷宫里面还有一些传送门,可以传送到任意一个另外的传送门的位置 阅读全文
posted @ 2017-09-26 23:00 euzmin 阅读(198) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2017-08-08 13:45 euzmin 阅读(219) 评论(0) 推荐(0)
摘要:bfs的思想还是很好理解的,类似于树的层次遍历。 通过做两道题,看各种解题报告,终于大致知道代码是如何实现的了。(建议大家还是把数据结构相关的内容看完再写题,不然就会像我一样根基不稳 T T) poj3984-迷宫问题 本渣是根据这道题来学习广搜的,bfs()函数这段看了好几个小时才看明白(看懂后感 阅读全文
posted @ 2017-02-13 21:50 euzmin 阅读(524) 评论(0) 推荐(0)