摘要: #include #include #include #include #include using namespace std; #define N 2000010 char s[N],p[N]; int next1[N]; int kmp(char* s, char* p) { int num=0; int i = 0; int j = 0; ... 阅读全文
posted @ 2017-05-30 21:37 kimsimple 阅读(124) 评论(0) 推荐(0) 编辑
摘要: map巧过 经典字典树(前缀树) 第一个字典树(G++内存超限),第二个map(红黑树),对于此类问题,字典树效率优势明显 hihoCoder1014 阅读全文
posted @ 2017-05-30 12:21 kimsimple 阅读(172) 评论(0) 推荐(0) 编辑