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 |
Re:一个剪枝。。。。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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator