hdu5918-Sequence I (kmp)
题目来源:http://./showproblem.php?pid=5918题意给出一个a序列,b序列,然后问在a序列中有多少个b序列,并且是以下形式: b1,b2,⋯,bmb1,b2,⋯,bm is exactly the sequence aq,aq+p,aq+2p,⋯,aq+(m−1)paq,aq+p,aq+2p,⋯,aq+(m−1)p where q+(m−1)p≤nq+(m−1)p≤n