poj-2935 BFS Basic Wall Maze】的更多相关文章

Basic Wall Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3384   Accepted: 1525   Special Judge Description In this problem you have to solve a very simple maze consisting of: a 6 by 6 grid of unit squares 3 walls of length between…
Basic wall maze Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 168    Accepted Submission(s): 52 Special Judge Problem Description In this problem you have to solve a very simple maze consisti…
是一个图论的基础搜索题- 没什么好说的就是搜索就好 主要是别把 代码写的太屎,错了不好找 #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> using namespace std; int sx,sy,ex,ey; struct info { int x,y; char ko; int qian; }; info que[40]; bool flag[10][10];…
Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9718   Accepted: 3263 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the gr…
poj2935:http://poj.org/problem?id=2935 题意:在6*6的格子中,有一些,如果两个格子之间有墙的话,就不能直接相通,问最少要经过几步才能从起点走到终点.并且输出路径. 题解:直接bfs #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #include<queue> using namespace std; str…
BFS. /* 1484 */ #include <iostream> #include <queue> #include <string> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef struct { int x, y; string s; } node_t; ][][]; ][]; ] = "…
http://poj.org/problem?id=2935 Basic Wall Maze Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3220   Accepted: 1457   Special Judge Description In this problem you have to solve a very simple maze consisting of: a 6 by 6 grid of unit sq…
Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9821   Accepted: 3283 Description The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the gr…
题目地址 题目与最基本的BFS迷宫的区别就是有一些障碍,可以通过建立三维数组,标记某个地方有障碍不能走.另一个点是输出路径,对此建立结构体时要建立一个pre变量,指向前一个的下标.这样回溯(方法十分经典)就可以顺利的输出. 这道题难度的确很小,可是我却花了近两个小时才顺利AC,实在是现在水平太不足了,要努力学习的真的是有好多啊.不管怎样,尽力吧. #include<cstdio> #include<cstring> #include<algorithm> #includ…
题意: 求把S和所有的A连贯起来所用的线的最短长度... 这道题..不看discuss我能wa一辈子... 输入有坑... 然后,,,也没什么了...还有注意 一次bfs是可以求当前点到所有点最短距离的... #include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> #include <cmath> #d…