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 |
记忆化搜索TLE的可能是这种原因~dp[][]二维数组不能初始化为0,如果初始化为0的话,比如 ()()()()()()()()()()()()()()()()()()()()()()()() 这样的数据,记忆化搜索就作用不大了。 初始化为-1就好了~ 附记忆化搜索代码 http://www.conw.net/post-77.html Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator