![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bfs
WindSearcher
打造自己的梦想,否则就被雇佣打造他人的梦想!
展开
-
J - 迷宫问题 poj 3984 (bfs+输出路径)
Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1 2 3 4 5 6 7 8 9 }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求...原创 2018-10-04 23:11:34 · 207 阅读 · 0 评论 -
B - Dungeon Master
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 north, south...原创 2018-10-05 10:04:23 · 86 阅读 · 0 评论 -
C - Catch That Cow
C - Catch That Cow 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 p...原创 2018-10-05 10:17:58 · 117 阅读 · 0 评论 -
E - Find The Multiple
E - Find The Multiple Given a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not gr...原创 2018-10-05 11:01:53 · 128 阅读 · 0 评论 -
M - Find a way [kuangbin带你飞]专题一 简单搜索 [Cloned] HDU 2612
M - Find a way Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki. Yifenfei’s ho...原创 2018-10-06 23:13:31 · 157 阅读 · 0 评论 -
P3956 棋盘
https://www.luogu.org/problemnew/show/P3956 题目描述 有一个m×mm \times mm×m的棋盘,棋盘上每一个格子可能是红色、黄色或没有任何颜色的。你现在要从棋盘的最左上角走到棋盘的最右下角。 任何一个时刻,你所站在的位置必须是有颜色的(不能是无色的), 你只能向上、 下、左、 右四个方向前进。当你从一个格子走向另一个格子时,如果两个格子的颜色相...原创 2018-11-05 22:05:50 · 357 阅读 · 0 评论 -
B - A strange lift
原文:https://vjudge.net/contest/286102#problem/B 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...原创 2019-03-14 10:46:30 · 147 阅读 · 0 评论