BFS
少点多些
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hdu1253
#include #include #include using 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 · 450 阅读 · 0 评论 -
hdu2425
Hiking Trip Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1267 Accepted Submission(s): 552 Problem Description Hiking in the m原创 2014-05-07 23:24:42 · 439 阅读 · 0 评论 -
zoj1649(优先队列)
Rescue Time Limit: 2 Seconds Memory Limit: 65536 KB Angel 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 · 1061 阅读 · 0 评论 -
poj 2251 (bfs)
#include #include #include #include #define maxm 35 using 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 · 546 阅读 · 0 评论 -
BFS
#include #include #include #include using 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 · 404 阅读 · 0 评论 -
hncu 1101(bfs)
#include #include #include #include using 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 · 470 阅读 · 0 评论
分享