这次的题目多的有点变态啊!
链接
我才做了8个模版体- -#,这几天慢慢补上去、
所谓的next数组: next[n] 表示从字符串前n个字符的前缀后缀的共有长度。
A - Number Sequence
Description
Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1] = b[M].
If there are more than one K exist, output the sm......
阅读全文