随笔分类 -  字符串

摘要:函数: 使用方法: 阅读全文
posted @ 2016-08-03 18:55 相儒以沫 阅读(413) 评论(0) 推荐(0)
摘要:#include #include #include #include #include using namespace std; const int K=26;//一共有多少种字符 const int MAXC=500010;//模版串包含的字符数量 const int MAXN=1000010;//匹配串的最大长度 struct Trie { int next[M... 阅读全文
posted @ 2016-08-03 18:54 相儒以沫 阅读(193) 评论(0) 推荐(0)
摘要:静态字典树比动态字典树节省时间,动态字典树创建指针的过程太浪费时间 阅读全文
posted @ 2016-07-12 12:00 相儒以沫 阅读(225) 评论(0) 推荐(0)
摘要:#include #include #include using namespace std; int next1[1000010]; int m; char b[1000010]; void build_next() { int i=0; int j=-1; next1[0]=-1; while(i<m) { while(j!... 阅读全文
posted @ 2016-05-25 09:07 相儒以沫 阅读(193) 评论(0) 推荐(0)
摘要:附上博客http://blog.csdn.net/muxidreamtohit/article/details/8865210 阅读全文
posted @ 2016-05-25 09:06 相儒以沫 阅读(203) 评论(0) 推荐(0)
摘要:附上一篇博客http://blog.csdn.net/cambridgeacm/article/details/7752247 阅读全文
posted @ 2016-05-25 09:05 相儒以沫 阅读(124) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 int n; 8 int next1[100010]; 9 char s[100010];10 11 void getnext()12 {13 int i=... 阅读全文
posted @ 2015-10-06 18:46 相儒以沫 阅读(128) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 int m,n; 8 char s[1010]; 9 char t[1010];10 int next1[1010];11 12 void getnext()13 ... 阅读全文
posted @ 2015-10-06 13:26 相儒以沫 阅读(127) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 char s[1000010]; 8 char t[10010]; 9 int next1[10010];10 int m,n;11 12 void getnext... 阅读全文
posted @ 2015-10-06 12:50 相儒以沫 阅读(141) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 4 using namespace std; 5 6 int n,m; 7 int t[100010]; 8 int s[1000010]; 9 int next1[100010];10 11 void getnext()12 {13 ... 阅读全文
posted @ 2015-10-06 10:40 相儒以沫 阅读(203) 评论(0) 推荐(0)