![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
mrkdian
这个作者很懒,什么都没留下…
展开
-
HDU 2087 / POJ 3461 KMP拓展
#include #include const int maxn=1005; char str1[maxn],str2[maxn]; int next[maxn]; void getnext(char *str,int len) { next[1]=0; int k=0; for(int i=2;i<len+1;i++) { while(k>0&原创 2015-03-21 00:05:42 · 306 阅读 · 0 评论 -
hdu 1247 字典树模版
对于每个字符串,判断是否为hatword,可以先找此字符串不同的划分前缀,然后对每个前缀对应的后缀进行检查,是否满足题目条件。 #include #include const int maxn=100000; int node[maxn][26]; bool finish[maxn]; int pos=0; void add(char *str) { int rt=0; fo原创 2015-03-19 20:09:40 · 358 阅读 · 0 评论