![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BFS
少点多些
这个作者很懒,什么都没留下…
展开
-
hdu1253
#include#include#includeusing namespace std;int a, b, c, t;int map[50][50][50];int dir[6][3] = {{-1,0,0},{1,0,0},{0,-1,0},{0,1,0},{0,0,-1},{0,0,1}};struct location{ int x, y, z;};bool rig原创 2014-05-04 21:01:31 · 401 阅读 · 0 评论 -
hdu2425
Hiking TripTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1267 Accepted Submission(s): 552Problem DescriptionHiking in the m原创 2014-05-07 23:24:42 · 384 阅读 · 0 评论 -
zoj1649(优先队列)
RescueTime Limit: 2 Seconds Memory Limit: 65536 KBAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save原创 2014-05-24 23:51:35 · 951 阅读 · 0 评论 -
poj 2251 (bfs)
#include#include#include #include#define maxm 35using namespace std;int n, m, t;char map[maxm][maxm][maxm];bool visit[maxm][maxm][maxm];int dir[6][3] ={0,-1,0,0,1,0,0,0,-1,0,0,1,1,0,0,-1,0,0}原创 2014-07-17 22:02:40 · 507 阅读 · 0 评论 -
BFS
#include#include#include #includeusing namespace std;int n, m;char map[205][205];bool visit[205][205];int dir[4][2] ={-1,0,1,0,0,-1,0,1};int bx, by;struct point{ int x, y, step; friend boo原创 2014-07-17 21:10:09 · 364 阅读 · 0 评论 -
hncu 1101(bfs)
#include#include#include#includeusing namespace std;int bx, by, ex, ey;bool visit[8][8];int dir[8][2]={-1,-2,-2,-1,-2,1,-1,2,1,2,2,1,2,-1,1,-2}; struct node{ int x, y, step;};原创 2014-07-15 23:02:54 · 431 阅读 · 0 评论