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
hdu1240
hdu1240
三维bfs最短路轻松1A
#defineDeBUG#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusingnamespacestd;#definezero{0}#defineINF2000000000#defineEPS1e-6typedeflon
Sky-J
·
2020-08-25 05:52
ACM-搜索
hdu1240
三维bfs最短路径
Asteroids!TimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4595AcceptedSubmission(s):2962InputInputtothisproblemwillconsistofa(non-empty)seriesofupto100dataset
Chihiro1231
·
2020-08-25 02:49
hdu1240
Asteroids!--DFS & BFS
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1240一:题意三维空间,中o表示可以走,x表示不能走,给出行走的起始点和目的点的坐标,问最少多少步可以从起点到达目的点。二:AC代码DFS:#define_CRT_SECURE_NO_DEPRECATE#define_CRT_SECURE_Cy1_OVERLOAD_STANDARD_NAMES1#inc
LaoJiu_
·
2020-07-14 05:30
【搜索】--DFS/BFS
HDU
算法
C++
BFS
DFS
ACM 搜索
hdu1240
Asteroids!
ProblemDescriptionYou'reinspace.Youwanttogethome.Thereareasteroids.Youdon'twanttohitthem. InputInputtothisproblemwillconsistofa(non-empty)seriesofupto100datasets.Eachdatasetwillbeformattedaccordingtot
Little_boy_z
·
2016-05-14 10:00
HDU1240
Asteroids!(BFS)
题解:三维BFS,和胜利大逃亡差不多代码#include #include #include usingnamespacestd; charmap[20][20][20]; intvis[20][20][20]; intn; intsx,sy,sz; intex,ey,ez; inttx[]={1,-1,0,0,0,0}; intty[]={0,0,1,-1,0,0}; inttz[]={0,0
qq_21057881
·
2016-01-18 13:00
hdu 1240广搜
/* *
hdu1240
/win.cpp * Created on: 2012-11-18 * Author : ben */ #include <cstdio>
·
2015-11-11 10:50
HDU
hdu1240
Asteroids!TimeLimit:2000/1000MS(Java/Others)MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):4215AcceptedSubmission(s):2731ProblemDescriptionYou'reinspace.Youwanttogethome.Thereareasteroids.You
d_x_d
·
2015-09-05 12:00
HDU1240
:Asteroids
DescriptionYou'reinspace. Youwanttogethome. Thereareasteroids. Youdon'twanttohitthem. InputInputtothisproblemwillconsistofa(non-empty)seriesofupto100datasets.Eachdatasetwillbeformattedaccordingtothef
axiqia
·
2015-04-04 14:00
hdu1240
——Asteroids!
Asteroids!TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3497 AcceptedSubmission(s):2312ProblemDescriptionYou'reinspace.Youwanttogethome.Thereareaster
Guard_Mine
·
2014-09-09 19:00
bfs
hdu1240
/poj2225 BFS广搜的再理解
原题地址HDUOJPOJ题目介绍题意这同样是一道搜索题,所不同的是要搜索的图是三维的而不是二维的。但这并没什么大的改变,只是增加了两个搜索的方向而已。陷阱要注意的地方是,所给出的起点终点的坐标是按照列,行,层的顺序。关于BFS与DFS不同,BFS能保证所搜到的路径一定是最短路径,所以我们不需要维护一个多维(此处为3维)数组来记录访问到每一点的最小步数,只需要维护一个多维数组来标记是否走过就可以了。
guodongxiaren
·
2014-07-14 10:00
搜索
bfs
poj2225
hdu1240
——
hdu1240
Asteroids!TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):3161 AcceptedSubmission(s):2108ProblemDescriptionYou'reinspace.Youwanttogethome.Thereareaster
lx417147512
·
2014-04-30 15:00
ACM
hdu1240
Asteroids
三维BFS
HDU1240
三维BFS#include#include#include#includeusingnamespacestd;structnode{ intx,y,z; intstep;}st,end;intn,res;charmaps[15][15][15];intmove[6][3]={{0,1,0},{0,-1,0},{-1,0,0},{1,0,0},{0,0,1},{0,0,-1}};boolchec
u013570474
·
2014-04-24 19:00
三维广搜 PKU2225||ZJU1438
//
HDU1240
#include #include #include #include #include #include #include usingnamespacestd; #defineinf10000000
u012861385
·
2013-11-17 11:00
HDU1240
:Asteroids!
点击打开题目链接Asteroids!TimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2625 AcceptedSubmission(s):1765ProblemDescriptionYou'reinspace.Youwanttogethome.There
l383137093
·
2013-08-03 16:00
搜索
bfs
HDU1240
:Asteroids!(BFS)
ProblemDescriptionYou'reinspace.Youwanttogethome.Thereareasteroids.Youdon'twanttohitthem. InputInputtothisproblemwillconsistofa(non-empty)seriesofupto100datasets.Eachdatasetwillbeformattedaccordingtot
libin56842
·
2013-06-03 21:00
ACM
HDU
bfs
HDU1240
Asteroids!
这个题其实没什么难度,主要要注意的就是输入数据时候的坐标要与代码其他地方所用的坐标规则保证是一致的就可以了的。代码如下:#include#includeusingnamespacestd;typedefstructPoint {intx,y,z; inttimer; }point;intdir[6][3]={{0,0,1},{0,0,-1},{1,0,0}
Paradise_for_why
·
2010-08-07 20:00
c
timer
struct
ini
上一页
1
下一页
按字母分类:
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
其他