。。。

导航

2017年8月9日 #

【字符串入门专题1】D - Period hdu 1358【kmp-最小循环节简单应用】

摘要: PeriodProblem DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we wa... 阅读全文

posted @ 2017-08-09 18:03 大学僧 阅读(208) 评论(0) 推荐(0) 编辑

【字符串入门专题1】F - Seek the Name, Seek the Fame poj2752【kmp】

摘要: Seek the Name, Seek the FameDescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat t... 阅读全文

posted @ 2017-08-09 17:19 大学僧 阅读(197) 评论(0) 推荐(0) 编辑

【字符串入门专题1】B - Simpsons’ Hidden Talents hdu2594【kmp】

摘要: Simpsons’ Hidden TalentsProblem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah,... 阅读全文

posted @ 2017-08-09 10:50 大学僧 阅读(201) 评论(0) 推荐(0) 编辑

【字符串】【扩展kmp模板】

摘要: /*主函数里初始化和调用*//*next[0] = 0;exkmp(s2+1,s2,next+1,next);exkmp(s1,s2,ex,next);*//*扩展kmp算法可以用o(n+m)的复杂度求出字符串s1的任意后缀与字符串s2的最长公共前缀*//*扩展kmp算法的next[i]==j表示s... 阅读全文

posted @ 2017-08-09 06:24 大学僧 阅读(113) 评论(0) 推荐(0) 编辑