![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
bocmingbetter
这个作者很懒,什么都没留下…
展开
-
POJ - 2251 BFS
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原创 2017-04-16 20:47:33 · 194 阅读 · 0 评论 -
POJ-3984 BFS
题意很简单,中文题,我就不解释了,直接看看代码吧,很水的一个BFS题。 #include #include #include using namespace std; struct node { int x, y, father; }edge[60]; int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; int s[6][6],原创 2017-04-22 22:30:07 · 185 阅读 · 0 评论 -
POJ - 1426 思维BFS
题意:就是只有1和0组成的一个数,能整除N. 因为答案不唯一,所以可以暴力的用BFS求出来很简单。#include #include #include using namespace std; typedef unsigned long long ull; void bfs(ull n) { queue q; q.push(1); while(!q.empty(原创 2017-04-22 22:31:25 · 180 阅读 · 1 评论