广度优先
广度优先相关算法
DeepGoAI
欢迎学习交流!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT A1076 Forwards on Weibo
PAT A1076 Forwards on Weibo#include <iostream>#include<vector> #include<queue> #include<cstring>using namespace std;const int MAXN = 10000;vector<int> map_[MAX...原创 2019-08-31 22:30:32 · 266 阅读 · 0 评论 -
Red and Black POJ - 1979
Red and Black POJ - 1979 There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of ...原创 2019-01-10 10:36:08 · 306 阅读 · 0 评论 -
G - 逃生 HRBUST - 2074
G - 逃生 HRBUST - 2074 小A沦落到了一个迷宫之中,这个迷宫由n*m个格子构成,有些格子是不能通过的,现在他要从迷宫入口(1,1)的格子走到迷宫出口(n,m)的格子。因为小A的方向感很弱,转多了会晕,所以他走到目的地的时候,最多能转z次,否则他就永远晕倒在原地了,到了出口也没法出去了。 请你告诉他最少能经过多少个格子走出迷宫。 小Y从(1,1)出发到达的...翻译 2019-02-26 20:28:54 · 363 阅读 · 0 评论 -
Push Box HDU - 1732
Push BoxHDU - 1732Push Box is a classic puzzle game. This game play in a grid, there are five types of block in it, the player, the box, the hole, empty place, and the wall. In every step, playe...翻译 2019-03-03 23:08:11 · 307 阅读 · 0 评论 -
Fill UVA - 10603
FillUVA - 10603题目大意:给定三个水杯,a,b,c ,并且 a,b 为空杯,c 倒满,给定一个容量 d 要求给出当,杯中有出现容量为d 的情况时,给出最少的水交换容量,如果没有 则给出d' 要求 d' 尽可能得接近 d思路:使用爆搜,广度优先遍历,对应的记录每一个状态下的 每一个杯子的含有的水量和已经交换的水的容量当出现d容量的情况时...翻译 2019-03-07 13:25:59 · 298 阅读 · 0 评论
分享