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 |
记忆化搜索的教训这题的方程很好想,但是我用记忆化搜索编出来之后却超时,原因是没有判断x是否大于y,很容易找出致使x>y的例子比如在搜到类似“()”的字符串时,S[x]==S[y],所以在进一步递归时x就会大于y。 所以这题的教训就是,以后遇到了二分或记忆化搜索的题时,一定要把边界把握仔细,否则会酿成大错。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator