摘要: hdu 3336 Count the string Description It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can... 阅读全文
posted @ 2016-03-22 20:09 ZhMZ 阅读(409) 评论(0) 推荐(0) 编辑
摘要: kmp能够实现单模板串的快速匹配。 备忘:cstring 头文件里的char* strstr 函数也是比较一个字符串是否为另一个字符串的子串,与KMP功能相同,速度究竟谁快? 经过测试,aaaaaa…….aaaab(len =1000) 去匹配 aaaaaaa…..aaab(len=1000000) strstr 函数用了将近一秒钟,而kmp算法只花了不到0.1秒的时间。除了这种极端的... 阅读全文
posted @ 2016-03-22 18:51 ZhMZ 阅读(172) 评论(0) 推荐(0) 编辑