摘要: POJ 2406的升级版大同小异#include #include "stdio.h"#include #include using namespace std;#define n 1000010int next[n],l;char s[n];void getNext(){ int j,k; nex... 阅读全文
posted @ 2014-07-22 14:51 Mr.XuJH 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 求NEXT[]数组用next数组求字符串的周期若周期大于1:next[l]会回到上一个周期的最后一个元素#include #include "stdio.h"#include #include using namespace std;#define n 1000010int next[1000010... 阅读全文
posted @ 2014-07-22 13:17 Mr.XuJH 阅读(175) 评论(0) 推荐(0) 编辑