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

Re:一个剪枝。。。。

Posted by gyjisme at 2009-11-21 02:18:04 on Problem 2192
In Reply To:一个剪枝。。。。 Posted by:soonyu at 2009-05-28 18:35:44
> 1  字符串长度是否符合
> 2  判断s3的最后一位  如果和s1s2均不等就no  这个剪枝让TLE的程序变成0ms....

虽然加了第二个剪枝,0MS过了。
但感觉如果是这样的样本,还是会很耗时。
s1 = ttttttttt..(199个)a
s2 = ttttttttt..(199个)b

s3 =ttttttt...tttttttt...ab

应该还是会很耗时。
但,就这样用回溯过了。

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