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
10085
uva:
10085
- The most distant state
10085
-Themostdistantstate题目大意:就和八码数问题类似,只是题目没有给最终的状态,要求你自己写出最终的状态,并且给出最短的路径。
u012997373
·
2014-03-07 15:00
[隐式图搜索]The most distant state UVA
10085
ProblemATheMostDistantStateInput: standardinputOutput: standardoutput The8-puzzleisasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadja
u011194165
·
2014-01-09 21:00
搜索
隐式图
UVa:
10085
The most distant state
八数码问题变形。还是bfs+判重,这里我尝试了set来判重,将9个格映射成一个9位整数。最后跑了3s多,还是很慢。。 #include #include #include #include #include #include #include usingnamespacestd; intM[5][2]={{1,0},{-1,0},{0,1},{0,-1}}; structState { intgr
kkkwjx
·
2013-10-23 13:00
bfs
判重
隐式图遍历
【索引】Implicit Graph Traversal
BeginningAlgorithmContests(RujiaLiu) Volume3.BruteForce::ImplicitGraphTraversal10603-Fill10422-KnightsinFEN
10085
u011328934
·
2013-08-31 13:00
UVA
10085
The most distant state(八数码问题)
TheMostDistantStateInput: standardinputOutput: standardoutput The8-puzzleisasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadjacenttoth
u011217342
·
2013-08-12 22:00
uva
10085
The most distant state(八数码)
TheMostDistantStateInput: standardinputOutput: standardoutput The8-puzzleisasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadjacenttoth
u011328934
·
2013-08-12 21:00
uva
10085
- The most distant state
bfs + 哈希技术,,,超经典,超高效代码:::#include #include #defineMAX1000000 intans,st[MAX][9],head[MAX],next[MAX],posi[MAX],fa[MAX],path[MAX]; intdx[4]={-1,1,0,0},dy[4]={0,0,-1,1}; chardir[4]={'U','D','L','R'}; inth
shankeliupo
·
2013-03-17 10:00
UVa
10085
- The most distant state
八数码问题的变形,bfs+哈希,打印路径时花了点时间,用哈希表next数组的原理进行回退就可以将问题解决。代码如下:#include #include #include #include #include #include usingnamespacestd; constintMAXSIZE=1000003; constintdx[4]={-1,1,0,0}; constintdy[4]={0,
GooMaple
·
2012-10-26 21:00
UVa10422和UVa
10085
两个题目都是类似的。八数码遍历的基本问题。自己早先前看过八数码问题,写了一遍,不过。后面对着解题报告,又按自己的思路写了一遍,还是不过。老是runtimeerror。不知道错在哪里,调试废了我一天。哪位有心研究下能指点出来感激不尽啊。打算放弃了。因为已经了解其中的算法了。就是....神啊,求指导。呜呜。就是模拟跳马和移动格子,然后进行广搜,用hash判重。关键是hash判重。UVA10422:#i
xcszbdnl
·
2012-08-23 23:00
uva
10085
- The most distant state
ProblemATheMostDistantStateInput:standardinputOutput:standardoutput The8-puzzleisasquaretrayinwhicheightsquaretilesareplaced.Theremainingninthsquareisuncovered.Eachtilehasanumberonit.Atilethatisadjace
Frankiller
·
2012-08-18 16:00
struct
Integer
input
each
transformation
output
UVA
10085
- The most distant state
题目链接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=110&page=show_problem&problem=1026 类型: 隐式图搜索 原题: The 8-puzzle is a square tray in which eigh
king_tt
·
2012-07-26 00:00
ant
UVA
10085
- The most distant state
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=110&page=show_problem&problem=1026类型:隐式图搜索原题:The8-puzzleisasquaretrayinwhicheightsquaretilesareplaced.Theremainingnin
shuangde800
·
2012-07-26 00:00
上一页
1
2
下一页
按字母分类:
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
其他