该文被密码保护。 阅读全文
posted @ 2014-08-07 11:12 ForeverEnjoy 阅读(2) 评论(0) 推荐(0)
摘要: KMP,在有循环节的前提下: 循环节 t = len-next[len], 个数num = len/(len-next[len]);个人理解,如果有循环节,循环节长度必定小于等于len/2, 换句话说next[len]>=len/2;对于len%(len-next)!=0的这种情况不讨论,循环节不存在。下面是假设循环节存在的情况当次数等于2, 对于abcabc这种情况就不用说了,len = 6,... 阅读全文
posted @ 2014-08-07 10:46 ForeverEnjoy 阅读(183) 评论(0) 推荐(0)
摘要: hdu 3374 String Problem 最小表示法 view code#include #include #include #include #include #include using namespace std; const int N = 10010; int n; char s[105]; mapma; void getminsub(char *s) { ... 阅读全文
posted @ 2014-08-07 09:29 ForeverEnjoy 阅读(185) 评论(0) 推荐(0)