Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

记忆化搜索TLE的可能是这种原因~

Posted by QHearting at 2015-06-25 10:07:22 on Problem 1141
dp[][]二维数组不能初始化为0,如果初始化为0的话,比如
()()()()()()()()()()()()()()()()()()()()()()()()
这样的数据,记忆化搜索就作用不大了。
初始化为-1就好了~
附记忆化搜索代码 http://www.conw.net/post-77.html

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator