![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
水沢まつり
只要心灵不曾溃败,愿望就可达成的吧。
展开
-
【POJ3278】Catch That Cow
Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0...原创 2019-07-05 10:46:38 · 111 阅读 · 0 评论 -
【POJ2251】Dungeon Master
Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit ...原创 2019-05-28 15:14:03 · 126 阅读 · 0 评论 -
【洛谷P1032】字串变换
卡了比较久的一道bfs…同时学到很多新姿势还旧债 思路就是不断根据变换规则,将变换后的字串加入队列,累加step计数,如果step>10就直接输出NO ANSWER。 在变换字串这一步卡了很久,直到了解到string里居然还有这么牛逼的replace()和find()函数…字符串欠债多 入队的字串需要判重否则字串变换上可能会陷入奇妙的无限循环 ,这个用STL的set解决 另外一个需要注意的...原创 2019-08-22 08:12:36 · 181 阅读 · 0 评论