KMP
poursoul
这个作者很懒,什么都没留下…
展开
-
【HDU】3336 Count the string KMP
Count the stringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4349 Accepted Submission(s): 2032Problem DescriptionIt is wel原创 2014-06-27 17:22:36 · 791 阅读 · 0 评论 -
【HDU】2203 亲和串 KMP
传送门:【HDU】2203 亲和串原创 2014-06-28 11:37:37 · 913 阅读 · 0 评论 -
【HDU】1358 Period KMP
传送门:#include #include #include using namespace std ;const int maxN = 1000005 ;char a[maxN] ;int fail[maxN] ;void Get_Fail ( char a[] , int len ) { fail[1] = 0 ; for ( int i = 2 , j原创 2014-06-28 11:51:28 · 713 阅读 · 0 评论 -
【HDU】1711 Number Sequence KMP
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10306 Accepted Submission(s): 4681Problem DescriptionGiven tw原创 2014-06-27 17:01:03 · 776 阅读 · 0 评论 -
【CodeForces】471D MUH and Cube Walls KMP
传送门:【CodeForces】471D MUH and Cube Walls原创 2014-09-27 08:17:50 · 989 阅读 · 0 评论 -
【ural】1996. Cipher Message 3【FFT+KMP】
传送门:【ural】1996. Cipher Message 3题目大意:问至少将多少个AA串的字节的最低位取反使得BB串是AA串的子串。题目分析:可以发现,只要将BB串翻转一下,AA串和BB串的匹配就符合一个卷积公式了。令aia_i为A串第ii个字节的最低位,bjb_j为B串第jj个字节的最低位(ai,bj∈{0,1}a_i,b_j\in \{0,1\})。AA串用多项式表示为: A=∑ni=1原创 2015-05-07 14:55:53 · 1148 阅读 · 0 评论