![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp状态压缩
worldwsyw
acm之路艰难又漫长,我会走到最后
展开
-
hdu1429 胜利大逃亡(续)bfs状态压缩
Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。原创 2014-08-07 17:10:36 · 438 阅读 · 0 评论 -
hdu4771,Stealing Harry Potter's Precious,bfs,状态压缩
用s标记状态,bfs一下就行了 我怕忘记就几下来了 #include #include #include using namespace std; int n,m,k,a[110][110]; int dp[110][110][32]; char g[110][110]; int dx[110],dy[110]; int ax,ay; struct node { int x,y,s;原创 2014-08-07 17:22:16 · 439 阅读 · 0 评论 -
hdu1074写作业,dp状态压缩
Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands i原创 2014-08-08 09:52:12 · 456 阅读 · 0 评论 -
hdu4539状态压缩
这个题主要记住前一行和上上行的状态,前一行xiang原创 2014-08-06 16:44:43 · 484 阅读 · 0 评论