作业帮 > 综合 > 作业

为什么这道题会WA描述You are given a sequence of integers,A = a1,a2,..

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/16 05:54:01
为什么这道题会WA
描述
You are given a sequence of integers,A = a1,a2,...an.A consecutive subsequence of A (say ai,ai+1 ...aj) is called a "repeated sequence" if it appears more than once in A (there exists some positive k that ai+k = ai,ai+k+1 = ai+1,...aj+k = aj) and its appearances are not intersected (i + k > j).
Can you find the longest repeated sequence in
输入
Line 1:n (1
兄弟,你做的微软编程一小时那个题目吧?
你就差一点点,看到错误估计你要后悔了……
kmp函数第四行改成
for(int j=1;j