随笔分类 - 字符串
摘要:#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...
阅读全文
摘要:静态字典树比动态字典树节省时间,动态字典树创建指针的过程太浪费时间
阅读全文
摘要:#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!...
阅读全文
摘要:附上博客http://blog.csdn.net/muxidreamtohit/article/details/8865210
阅读全文
摘要:附上一篇博客http://blog.csdn.net/cambridgeacm/article/details/7752247
阅读全文
摘要: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=...
阅读全文
摘要: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 ...
阅读全文
摘要: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...
阅读全文
摘要: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 ...
阅读全文

浙公网安备 33010602011771号