E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Dungeon
POJ2251-
Dungeon
Master
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1303446571 题目大意: 给出一三维空间的地牢,要求求出由字符'S'到字符'E'的最短路径 移动方向可以是上,下,左,右,前,后,六个方向 每移动一次就耗费一分钟,要求输出最快的走出时间。不同L层的地图,相同RC坐标处是连通的
·
2015-11-13 09:35
master
poj2251:
Dungeon
Master
最初没有注意到结果是要求最小的步数,那么就成了最基本的迷宫找到一条出路的问题并记下找到出路时,所花的步数,那么很容易得到代码如下: 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 using namespace std; 5
·
2015-11-13 04:36
master
UVA 532 -
Dungeon
Master
的代码,我写了一遍能A、、、 #include <stdio.h>#include <string.h>#define Msize 29800typedef struct
Dungeon
·
2015-11-13 03:19
master
poj2251
Dungeon
Master 搜索BFS
题目:三维迷宫题:分析:在二维迷宫上多了上下搜索,求最优解,用BFS做,用队列储存上一个搜索过的节点,在下一次搜索时把删除最先入队的那个就行,另外得储存上一次的坐标,可以直接把x,y,z坐标分别乘以10000,100,1就行(注意到数据不超过30),把它作为新元素加入到队首中,借助数组判断是否已经走过,可以节省大量时间#include <iostream>#include <cs
·
2015-11-13 03:34
master
POJ 2251,
Dungeon
Master
Limit: 65536KTotal Submissions: 5685 Accepted: 2256 DescriptionYou are trapped in a 3D
dungeon
·
2015-11-13 01:15
master
POJ 2251
Dungeon
Master
这道题本来不难,但是写的纠结。三维广搜,只有六个方向,有一段时间没写结构体,发现很不熟练。 /*Accepted 612K 16MS C++ 2362B 2012-07-23 17:48:55*/ #include<cstdio> #include<cstring> #include<cstdlib> #include&
·
2015-11-13 01:14
master
poj 2251 BFS
Dungeon
Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions:&
·
2015-11-13 00:16
poj
【leetcode】
Dungeon
Game
Dungeon
Game The demons had captured the princess (P) and imprisoned her in the bottom-right corner
·
2015-11-13 00:56
LeetCode
Dungeon
Master
1 #include<cstdio> 2 #include<cstring> 3 #include<cmath> 4 #include<cstdlib> 5 #include<queue> 6 #include<algorithm> 7 #define MAXN 40 8 using namesp
·
2015-11-12 23:56
master
UVA532 -
Dungeon
Master(裸BFS)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=473 没什么意思 View Code 1 #include <iostream> 2 #include<cstdio> 3 #inclu
·
2015-11-12 14:35
master
POJ 2251
Dungeon
Master(BFS + A*)
题意: 3维迷宫,求从起点到终点最少要走的时间,若不能走到,则输出“Trapped!” 思路: 1. 求最短路径首先想到 BFS,本题稍有变化就是在于 3 维迷宫,其实和 2 维迷宫都是一样的; 2. 解法一采用了优先队列 + 估值函数,但是看来时间上并没有优化太多,同样都是 16ms; 解法一:BFS + A*(16ms) #include <iostream&
·
2015-11-12 13:22
master
Dungeon
Master bfs
nbsp; 64bit IO Format:%I64d & %I64u POJ 2251 Description You are trapped in a 3D
dungeon
·
2015-11-12 12:39
master
B -
Dungeon
Master POJ2251 三维的图 进行搜索,注意三维图的读入细节
B -
Dungeon
Master Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit
·
2015-11-11 18:02
master
POJ 2251
Dungeon
Master(BFS)
Dungeon
Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions:&
·
2015-11-11 13:12
master
Leetcode:
Dungeon
Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a
dungeon
.
·
2015-11-11 12:21
LeetCode
Dungeon
Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a
dungeon
.
·
2015-11-11 10:08
game
POJ 2251
Dungeon
Master(BFS)
题目链接 这个题,真郁闷啊!!!!昨天折腾了晚上写了个DFS。。。交了三次都超时,今天写BFS,折腾了一晚上 一个i打成start 我硬是没发现那里错了,这么大的错误,竟然过了很多数据,受不了啊。。。自己要认真认真认真啊!!!!!! 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <
·
2015-11-11 10:47
master
POJ2251
Dungeon
Master
http://poj.org/problem?id=2251 题意 : 就是迷宫升级版,从以前的一个矩阵也就是一层,变为现在的L层," . "是可以走,但是“#”不可以走,从S走到E,求最短的路径,若是找不到就输出“Trapped!”,每一层的同一个位置若都是" . "是可以直接走的,换句话说,map[1][j][k]与map[2][j][k]若都是&qu
·
2015-11-11 10:16
master
POJ 2251
Dungeon
Master
习惯用双广了,这次WA了好几次,标记起和终止始节点时发现了错误,后来没改彻底,具体见注释行。 双广速度快,空间小,结构也相对 bfs 简单; # include <stdio.h> # include <string.h> typedef struct {char l, r, c;}Pos; /* char 足够了,比较时没出错 */ const
·
2015-11-11 07:35
master
sgu 110
Dungeon
这道题是计算几何,这是写的第一道计算几何,主要是难在如何求入射光线的反射光线。 我们可以用入射光线 - 入射光线在法线(交点到圆心的向量)上的投影*2 来计算反射光线,自己画一个图,非常清晰明了。 具体到程序里,我们可以 v2 = v1 - fa / Length(fa) * 2 * ( Dot(v1, fa)
·
2015-11-11 02:12
du
poj
Dungeon
Master (bfs)
http://poj.org/problem?id=2251 #include<stdio.h> #include<string.h> #include<queue> #include<iostream> using namespace std; #define max 999999 #define N 40 int l,r,c,an
·
2015-11-11 01:31
master
poj2251——bfs
POJ 2251 bfs
Dungeon
Master Time Limit: 1000MS Memory Limit: 65536K
·
2015-11-11 00:26
poj
POJ 2251
Dungeon
Master【BFS】
题意:给出一个三维坐标的牢,给出起点st,给出终点en,问能够在多少秒内逃出。 学习的第一题三维的广搜@_@ 过程和二维的一样,只是搜索方向可以有6个方向(x,y,z的正半轴,负半轴) 另外这一题的输入的方式还要再多看看--@_@-- #include<iostream> #include<cstdio> #include<cstring>
·
2015-11-10 23:29
master
POJ 2251
Dungeon
Master (bfs)
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #include<queue> using namespace std; char mat[50][50][50]; int vis[50][5
·
2015-11-10 23:53
master
POJ 2251
Dungeon
Master
解题思路:BFS 代码 #include < iostream > using namespace std; char map[ 30 ][ 30 ][ 31 ]; bool visit
·
2015-11-10 21:13
master
SGU 110
Dungeon
(光线和球的反射)
题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=110 题意:给以一些球和一束光线。光线在球之间来回反射。求出光线遇到的各个球的编号。 思路:主要就是求直线与球的反射。首先,求出交点,这个用直线的参数方程。然后由交点求出反射光线。 class point { public: double x,y,z;
·
2015-11-09 14:29
反射
dnf脚本的研究
[player number] 2 8 [pvp start area]0 0 0 00 0 0 00 0 0 0[
dungeon
]62[/
dungeon
][type] `[normal]`
·
2015-11-09 13:50
脚本
Leetcode#174
Dungeon
Game
原题地址 典型的地图寻路问题 如何计算当前位置最少需要多少体力呢?无非就是在向下走或向右走两个方案里做出选择罢了。 如果向下走,看看当前位置能提供多少体力(如果是恶魔就是负数,如果是草药就是正数),如果当前位置能够提供的体力比向下走所需要的最小体力还多,那么当前位置只需要1的体力就够了;否则,计算出额外需要多少体力。 如果向右走,同理。 设任意坐标(i, j)处最少需要h
·
2015-11-09 12:18
LeetCode
POJ2251
Dungeon
Master 解题报告
作者:ACShiryu 时间:2011-7-23 地址: http://www.cnblogs.com/ACShiryu/archive/2011/07/23/2114994.html
Dungeon
·
2015-11-08 16:46
master
Dungeon
Game
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a
dungeon
.
·
2015-11-08 15:17
game
poj 2251
Dungeon
Master
大意:给定一个3D迷宫,已知出口和入口,求最小逃脱迷宫的时间。 思路1:DFS需要求最小路需要回溯,果断TLE。下附DFS代码: void dfs( int x, int y, int z) { if(!check(x, y,&nbs
·
2015-11-08 11:38
master
POJ 2251
Dungeon
Master (bfs)
//三维迷宫 //标准的bfs #include <iostream> #include <queue> #include <memory.h> using namespace std; struct coordinate { int x,y,z,step; }; int L,R,C; bool isvisited[31][31]
·
2015-11-07 13:05
master
F:ungeon Master
总时间限制: 1000ms 内存限制: 65536kB描述You are trapped in a 3D
dungeon
and need to find the quickest way out!
·
2015-11-07 12:20
master
poj 2251
Dungeon
Master
id=2251
Dungeon
Master Time Limit: 1000MS Memory Limit: 65536K Total Submissions
·
2015-11-07 11:09
master
Dungeon
Game
Dungeon
Game The demons had captured the princess (P) and imprisoned her in the bottom-right corner
·
2015-11-07 11:36
LeetCode
Dungeon
Master(poj 2251)
Description You are trapped in a 3D
dungeon
and need to find the quickest way out!
·
2015-11-06 07:28
master
flash开源游戏引擎pushButton学习笔记(2)----Components(组件)
第一个用组件构建和发布的重要游戏是
Dungeon
Sieg
·
2015-11-05 08:36
component
poj 2251
Dungeon
Master
id=2251
Dungeon
Master Description You are trapped in a 3D
dungeon
and need to find the quickest way
·
2015-11-03 22:40
master
poj 2251
Dungeon
Master (bfs)
http://poj.org/problem?id=2251 刷水题好爽!但是别真跟xcy说的一样,把rp都给用完了... 三维空间的bfs,只是搜索的时候多了两个方向而已。 code: #include<cstdio> #include<cstring> bool vis[ 31][ 31][ 31] ; int l
·
2015-11-03 22:40
master
POJ 2251
Dungeon
Master(三维6方向BFS)
B -
Dungeon
Master Time Limit:1000MS Memory Limit:65536KB &
·
2015-11-03 21:36
master
Dungeon
Master--POJ 2251
1、题目类型:模拟、迷宫、BFS。 2、解题思路:BFS的三维Maze[][][]应用,其每步存在前后、左右、上下6个方向的选择。 3、注意事项:BFS入队列的条件判断。 4、实现方法: #include < iostream > #include < queue > using
·
2015-11-02 16:49
master
POJ 2252
Dungeon
Master 三维水bfs
题目: http://poj.org/problem?id=2251 1 #include <stdio.h> 2 #include <string.h> 3 #include <queue> 4 using namespace std; 5 6 char maze[60][60][60]; 7 bool vis[
·
2015-11-02 11:19
master
Dungeon
Game
Dungeon
Game 问题: The demons had captured the princess (P) and imprisoned her in the bottom-right corner
·
2015-11-02 10:30
game
BFS解决POJ 2243
Description You are trapped in a 3D
dungeon
and need to find the quickest way out!
·
2015-11-02 10:38
poj
BFS解决POJ 2251
Description You are trapped in a 3D
dungeon
and need to find the quickest way out!
·
2015-11-02 10:35
poj
Dungeon
Master
DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannot
menxiaoyuan
·
2015-11-01 16:00
搜索
pku 2251
Dungeon
Master BFS
http://poj.org/problem?id=2251 很简单的求最短路径的BFS题目,才开始自己写了各DFS直接性TLE。。。 三维的,就是多加了两个方向罢了,再处理的时候就按i,j,k来; View Code #include <iostream> #include <cstring> #include <cstdio> #inc
·
2015-11-01 14:38
master
HEU 1042
Dungeon
Master
/**/ /************************************** Problem: HEU 1042
Dungeon
Master Time
·
2015-11-01 12:35
master
uva 532
Dungeon
Master
题意:一个三维方块,给出高长宽,并且按照从最低面一层(或者从最顶面一层)到最高一层逐层给出这个方块的信息。S表示起点E表示终点,#表示这个格子不能走, .表示这个格子能走,走的方向有6个,前后左右上下。能是否能从起点走到终点,若能输出最少的步数 首先想到的DFS+剪枝,后来TLE了,才自己脑子又进水了,应该用BFS,因为剪枝的话效率不高,而且题目求最小步数,显然符合BFS的特点 从
·
2015-10-31 19:50
master
[leetcode]
Dungeon
Game
class Solution { public: int calculateMinimumHP(vector<vector<int> > &
dungeon
)
·
2015-10-31 18:49
LeetCode
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他