好抽象啊,早上看了两个多小时才看懂,\(\%\%\%Fading\) 早就懂了 讲解就算了吧--可以去看看其他人的博客 1.[模板]后缀自动机 \(siz\) 为该串出现的次数,\(l\) 为子串长度,每次乘一下就好了 \(Code\ Below:\) #include <bits/stdc++.h> #define ll long long using namespace std; const int maxn=2000000+10; int n,a[maxn],c[maxn],last,c
Description Given two strings, you have to tell the length of the Longest Common Substring of them. For example:str1 = bananastr2 = cianaic So the Longest Common Substring is "ana", and the length is 3. Input The input contains several test case