随笔分类 -  字符串

摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1686 用KMP查找模式串在目标串中出现的次数。 我的KMP模板(感觉这样统一比较好记) 1 #include<cstdio> 2 #include<cstring> 3 const int maxn=1 阅读全文
posted @ 2017-03-24 21:18 yijiull 阅读(512) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1711 KMP模板题。 一篇很不错的关于KMP的讲解,认真看完可以掌握KMP,但是nex数组和平时用的不太一样(不建议用这个)。 另外一篇KMP,也很不错。 刚知道有一个函数:strstr()很好用,有需 阅读全文
posted @ 2017-03-24 21:14 yijiull 阅读(139) 评论(0) 推荐(0)