摘要: 出处:http://www.cnblogs.com/wuyiqi/archive/2012/01/06/2314078.html kmp next函数 kmp的周期问题,深入了解kmp中next的原理----------------------------------------------k m x j i由上,next【i】=j,两段红色的字符串相等(两个字符串完全相等),s[k....j]==s[m....i]设s[x...j]=s[j....i](xj=ji)则可得,以下简写字符串表达方式kj=kx+xj;mi=mj+ji;因为xj=ji,所以kx=mj,如下图... 阅读全文
posted @ 2013-08-25 16:46 海拉鲁的林克 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题目:Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1892Accepted Submission(s): 830Problem DescriptionCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are 阅读全文
posted @ 2013-08-25 16:08 海拉鲁的林克 阅读(220) 评论(0) 推荐(0) 编辑