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
POJ - 2251
Dungeon
Master 多维多方向BFS
DungeonMasterYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcann
yzm10
·
2017-07-26 16:00
一些在线学习网站
入门,太简单https://www.codecademy.com/来自codeschoolhttp://javascript.com/略复杂https://cn.codecombat.com/play/
dungeon
方健
·
2017-07-05 09:04
POJ 2251 B -
Dungeon
Master——双广度优先搜索
题意:在一个三维空间中寻找起止点之间的最短路,每次可以朝着同一个平面的前后左右走,或者到上一个平面或下一个平面与当前平面相同的位置。思路:bfs暴一遍超时,考虑双向bfs#include#include#include#include#includeusingnamespacestd;constintdx[]={0,0,-1,1};constintdy[]={1,-1,0,0};intl,r,c,
hao_zong_yin
·
2017-06-29 13:21
思维
C++广度优先搜索算法之
Dungeon
Master
DungeonMaster(地下城大师)Description(描述)Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east
TOP-SECRET
·
2017-06-15 13:26
广度优先搜索
错题大总结
搜索算法刷题集锦
C++广度优先搜索算法之
Dungeon
Master
DungeonMaster(地下城大师)Description(描述)Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east
C20190413
·
2017-06-15 13:00
C++
算法
基础
搜索
bfs
C++广度优先搜索算法之
Dungeon
Master
DungeonMaster(地下城大师)Description(描述)Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east
C20190413
·
2017-06-15 13:00
C++
算法
基础
搜索
bfs
B -
Dungeon
Master——广度优先搜索
Think:1错误反思:已入队过结点不要忘记标记+数组不要越界2知识点:广度优先搜索+队列思想B-DungeonMasterYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminuteto
leoxry
·
2017-05-18 16:52
错误反思
BFS
Dungeon
Master([kuangbin带你飞]专题一 简单搜索)
题目大意:题目链接给个多层的迷宫,求从起点到终点的最短路径,不能到达就输出Trapped!解体思路:bfs直接搜,没什么好说的,一开始忘记清空队列一只WA,果然我还是菜鸡#include#include#include#include#include#includeusingnamespacestd;structnode{intx,y,z;}no;queueq;intans=0;constintm
Strive_Buff
·
2016-10-14 21:11
简单搜索
poj
NYOJ 3D
dungeon
(bfs深搜)
3Ddungeon时间限制:1000ms|内存限制:65535KB难度:2描述Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,
Dreamlandz
·
2016-09-23 11:22
bfs
Dungeon
Game
题目描述:Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypositionedinthetop-leftroomandmustf
yeshiwu
·
2016-06-29 16:00
java
LeetCode
动态规划
Dungeon
Game
题目原文:Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypositionedinthetop-leftroomandmustf
cmershen
·
2016-05-31 23:00
Dungeon
Game 解题报告
题目链接:https://leetcode.com/problems/
dungeon
-game/Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight
qq508618087
·
2016-05-13 07:00
LeetCode
动态规划
Dungeon
Master
DungeonMasterTimeLimit:1000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice POJ2251DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposed
u014665013
·
2016-05-06 10:00
poj 1321 棋盘问题 - DFS 2251
Dungeon
Master - BFS
链接:戳这里棋盘问题TimeLimit:1000MSMemoryLimit:10000KDescription在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,nk,用一个空格隔开,表示
libin66
·
2016-05-05 23:00
POJ 2251
Dungeon
Master(三维简单广搜)
DungeonMasterTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:24931Accepted:9651DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefi
qq_32866009
·
2016-05-05 18:00
poj
leetcode笔记:
Dungeon
Game
一.题目描述Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypositionedinthetop-leftroomandmust
Herbert_Zero
·
2016-05-05 17:00
数据结构与算法
leetcode笔记:
Dungeon
Game
一.题目描述Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypositionedinthetop-leftroomandmust
liyuefeilong
·
2016-05-05 17:00
LeetCode
Algorithm
C++
dp
动态规划
POJ 2251
Dungeon
Master :NYOJ 353 3D
dungeon
(三维空间上的搜索 bfs )
DungeonMasterTimeLimit:1000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uDescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbef
xia842655187
·
2016-04-20 20:00
搜索
poj
3D
bfs
三维
POJ 2251
Dungeon
Master BFS&DFS
DungeonMasterTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:22227 Accepted:8672DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotb
qq845579063
·
2016-04-20 18:00
基础
DFS
bfs
广搜
深搜
AYIT606第七周周赛(3维广搜+队列) D -
Dungeon
Master地下勇士
D- DungeonMasterTimeLimit:1000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice POJ2251DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscompo
linyuxilu
·
2016-04-20 08:00
POJ2251---
Dungeon
Master---BFS最短路之三维迷宫
题目链接:http://poj.org/problem?id=2251题目大意:这个题是BFS的典型模板题,只不过有趣的是它将图形由平面变为了三维立体图形,自认为难点在输入上,采用三维字符数组,三层循环,最外层循环对应三维数组的第三维表示的就是层数。具体代码如下:#include #include #include #include usingnamespacestd; constintMAXN=
why850901938
·
2016-04-20 01:00
poj
bfs
nyoj353 3D
dungeon
首先是广搜版这个通过了测试并且没有超时/*A-地下城主描述你被困在一个3d地牢和需要找到最快的方法!单位立方体的地牢由可能是也可能不是充满了摇滚。移动一个单位需要一分钟北部,南部,东部,西部,向上或向下。你不能移动对角和迷宫周围是坚硬的岩石。可能是一种逃避?如果是,要多长时间?输入输入由一个地牢。每个地牢描述开头一行包含三个整数LR和C(所有大小限制在30)。L是水平占地牢的数量。R和C的行数和列
执念先生的小姐
·
2016-04-19 20:03
程序
搜索
深搜
广搜
poj 【2251】
Dungeon
Master
DungeonMasterTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 24669 Accepted: 9554DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormayn
chen_ze_hua
·
2016-04-14 21:00
SGU 110
Dungeon
(计算几何)
Description给出一束光线的坐标和入射方向,再给出n个球的球心坐标和半径(保证不重合不相交),这束光纤会在n个球之间反射(满足反射定律),输出反射的序列(即球的编号),注意相切也算反射,如果反射次数超过10次则只需要输出10次,后面输出etc.表示超过10次Input第一行一整数n(#include#includeusingnamespacestd;#definemaxn55#define
v5zsq
·
2016-04-14 11:59
计算几何
SGU
SGU 110
Dungeon
(计算几何)
Description给出一束光线的坐标和入射方向,再给出n个球的球心坐标和半径(保证不重合不相交),这束光纤会在n个球之间反射(满足反射定律),输出反射的序列(即球的编号),注意相切也算反射,如果反射次数超过10次则只需要输出10次,后面输出etc.表示超过10次Input第一行一整数n( #include #include usingnamespacestd; #definemaxn55 #d
V5ZSQ
·
2016-04-14 11:00
POJ 2251
Dungeon
Master bfs
DungeonMasterTimeLimit:1000MS MemoryLimit:65536KTotalSubmissions:24602 Accepted:9525DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbe
zp___waj
·
2016-04-11 20:00
C++
poj
bfs
[kuangbin带你飞]专题一 简单搜索 - B -
Dungeon
Master
B- DungeonMasterTimeLimit:1000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit Status Practice POJ2251DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscompo
Amaswz
·
2016-04-11 19:00
专题简单搜索
poj 2251
Dungeon
Master
这道是个用个简单的宽搜或者深搜就能做出来,只需要注意有上,下,左,上一层,下一层,后共计6个方向。难点在于读懂题意,地牢分为了n层,注意到这一点就简单了。#include #include usingnamespacestd; constintMAXSIZE=300; structcoord{ intx,y,z; intstep; booloperator()(constcoord&a,const
q1916569889
·
2016-04-05 11:00
poj
宽搜
POJ 2251
Dungeon
Master(BFS)
DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannot
liu940204
·
2016-04-01 20:00
POJ-2251-
Dungeon
Master【BFS】【三维迷宫问题】
2251-DungeonMasterDescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,
loy_184548
·
2016-04-01 11:00
poj
bfs
2251
poj-2251
Dungeon
Master【bfs】
很基础的一道bfs/*这题是一个三维的迷宫题目,其中用'.'表示空地,'#'表示障碍物,'S'表示起点,'E'表示终点, 求从起点到终点的最小移动次数,解法和二维的类似, 只是在行动时除了东南西北移动外还多了上下。 对于题目给出数据的含义就是输入l,r,c,分别代表迷宫有l层,每层长宽分别是c,r。 对于数据以可以这样移动 (1,1,1)->(1,1,2)->(1,1,3)->(1,1,4)->(
a915800048
·
2016-03-30 13:00
bfs
Dungeon
Game
Thedemonshadcapturedtheprincess(P)andimprisonedherinthebottom-rightcornerofadungeon.ThedungeonconsistsofMxNroomslaidoutina2Dgrid.Ourvaliantknight(K)wasinitiallypositionedinthetop-leftroomandmustfighth
u014568921
·
2016-03-25 12:00
LeetCode
【poj 2251】
Dungeon
Master 题意&题解&代码(C++)
题目链接:http://poj.org/problem?id=2251题意:题目大意:这题是一个三维的迷宫题目,其中用’.’表示空地,’#’表示障碍物,’S’表示起点,’E’表示终点,求从起点到终点的最小移动次数,解法和二维的类似,只是在行动时除了东南西北移动外还多了上下。题解:恶心的bfs搜最短路,从二位平面拓展到三维立体,其实也只需要把原本的二位方向数组改为三维即可。。。代码:迷之wanclu
deritt
·
2016-03-22 22:14
oi之路
poj
poj 2251
Dungeon
Master
问题描述Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannotmovedia
qq_31237061
·
2016-03-12 12:00
POJ-2251-
Dungeon
Master
J-DungeonMasterTimeLimit:1000MSMemoryLimit:65536KB64bitIOFormat:%I64d&%I64uSubmitStatusPracticePOJ2251DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubes
qq_32680617
·
2016-03-10 10:00
搜索
bfs
A -
Dungeon
Master
Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannotmovediagona
huangshuai147
·
2016-03-05 11:00
三维搜索(bfs)
Dungeon
Master
1.学会开三维数组保存空间的状态2.会用bfs搜索空间3.还有学会结构体的构造函数structnode{intvx,vy,vz;node(intx,inty,inty):vx(x),vy(y),vy(z){}};DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitc
AleiChen
·
2016-02-25 17:29
ACM
poj 2251
Dungeon
Master
简单的bfs。。没啥好说的。。#include #include intl,r,c; charmap[35][35][35]; intway[35][35][35]; structsb { intl; intr; intc; }s,e; intmove[6][3]={{0,0,1},{0,0,-1},{0,1,0},{0,-1,0},{1,0,0},{-1,0,0}}; intqueue[1000
qq_32995183
·
2016-02-18 23:00
poj
bfs
POJ 2551
Dungeon
Master
以后还是用容器写吧,手撸队列还是太麻烦了;一直找不到错在哪里了,后来才发现眼花啦,三个for循环把输出仍在里面了;就和线段树当时把预处理仍在里面一样,以后要仔细 仔细 仔细!大致题意:有一个3D的地牢,让你从S点到E点的最短时间,如果无法到达,就输出不可能; 广搜特性,搜出来的就是最短时间;顺带一提是六方向搜索,所以这里的写法是六方向的搜索写法;Descripti
qq_33638791
·
2016-02-15 01:00
POJ 2251
Dungeon
Master --- 三维BFS(用BFS求最短路)
POJ2251 题目大意: 给出一三维空间的地牢,要求求出由字符'S'到字符'E'的最短路径,移动方向可以是上,下,左,右,前,后,六个方向,每移动一次就耗费一分钟,要求输出最快的走出时间。不同L层的地图,相同RC坐标处是相连通的。(.可走,#为墙)解题思路:从起点开始分别往6个方向进行BFS(即入队),并记录步数,直至队为空.若一直找不到,则困住。/*POJ2251DungeonMaster--
TommyChok
·
2016-02-07 00:00
J -
Dungeon
Master
J- DungeonMasterTimeLimit:1000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit StatusDescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhi
AcmLzq
·
2016-01-25 11:00
队列
广搜
poj2251
Dungeon
Master (广度搜索)
DungeonMasterTimeLimit:1000MS MemoryLimit:65536KTotalSubmission
SDUTACM
·
2016-01-24 13:00
J -
Dungeon
Master poj2251
DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannot
maqinyao5566
·
2016-01-22 09:00
poj 2251
Dungeon
Master(bfs)
题意:一个立体空间,输入三个数,L,R,C,代表有L个平面,R行,C列,.代表可以走,#代表不能走,S代表开始点,E代表结束点,问从S开始走,对每个位置,有六个走法,即空间的六个方向的走法(上下东南西北),一分钟可以走一个点,问从S走到E点,最少可以经过多少分钟,若不能到达,则输出Trapped!#include #include #include usingnamespacestd; stru
u014552756
·
2016-01-20 19:00
POJ 2251
Dungeon
Master
题目大意:一个三维迷宫,从起点开始可以向“东南西北,上下”六个方向移动,求由起点到终点的最短路。迷宫表示方法:“#”:不能通过,“.”:可以通过,“S”为起始位置。“E”为终点。求最少需要多长时间走到终点(经过每一个点耗时一分钟)简单思路:由起点开始向6个方向移动,采用广搜,直到扩展到终。凡最短路问题一般采用广搜bfs。#include #include #include #include usi
Dextrad_ihacker
·
2016-01-20 15:00
poj
bfs
POJ2551
Dungeon
Master
DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,south,east,west,upordown.Youcannot
vector_M
·
2016-01-13 13:00
leetcode --
Dungeon
Game -- dp重点,典型题
https://leetcode.com/problems/
dungeon
-game/dp典型题目。
xyqzki
·
2015-12-24 19:00
LeetCode
POJ2251
Dungeon
Master(图搜)(三维bfs)
DungeonMasterTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 22503 Accepted: 8787DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormayn
mengxiang000000
·
2015-12-22 13:00
搜索
poj
poj
POJ2251
NYOJ 353--3D
dungeon
【水题 && BFS】
3Ddungeon时间限制:1000 ms | 内存限制:65535 KB难度:2描述Youaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedofunitcubeswhichmayormaynotbefilledwithrock.Ittakesoneminutetomoveoneunitnorth,so
hpuhjh
·
2015-11-23 21:00
poj 2251
Dungeon
Master(广搜)
题意:三维空间,可以走上下左右前后六个方向,求最短路径,BFS #include<stdio.h> #include<queue> #include<string.h> using namespace std; const int MAXN=50; char str[MAXN][MAXN][MAXN]; int s
·
2015-11-13 16:17
master
上一页
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
其他