Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
然后枚举行的范围做一下,再枚举列的范围做一下。这样比起直接搞状态是减少了很多。In Reply To:AC了,基于连通性状压dp搞的 Posted by:JiaJunpeng at 2014-03-11 21:59:44 > 一行有20个格子,直接dp肯定挂,注意T<=20 可以推断出行和列的最大间距的最小值min(max(row),max(col))==5,于是对行和列分别做一次dp, 限制间距不超过5就行了 > > 一行状态最多 598,不算上T 的话 > > 不过这个方法有点慢了,虽然没有做优化。。。。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator