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:对此题TLE无数次的总结:In Reply To:对此题TLE无数次的总结: Posted by:rruucc at 2004-04-22 02:16:33 > 1。相信库函数,不管它用的是什么算法它就是比你写的函数快(据说strstr(a,b)不是用KMP写的,不过就是比我的KMP快很多) > 2。避免重复操作 > 3。尽量用“++”这样有寄存器指令可以直接完成的运算 > 4。避免不同数据类型的转换 > 5。收获:练习了一次KMP :> Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator