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

记忆化搜索的教训

Posted by 5D6D2 at 2012-06-06 15:33:36 on Problem 1141
这题的方程很好想,但是我用记忆化搜索编出来之后却超时,原因是没有判断x是否大于y,很容易找出致使x>y的例子比如在搜到类似“()”的字符串时,S[x]==S[y],所以在进一步递归时x就会大于y。
所以这题的教训就是,以后遇到了二分或记忆化搜索的题时,一定要把边界把握仔细,否则会酿成大错。

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