摘要:
#include#include#include#includeusing namespace std;#define maxn 50000#define inf 0x3fffffffint wa[maxn],wb[maxn],ss[maxn],sa[maxn],wv[maxn];int cmp(int *r,int a,int b,int c){ return r[a]==r[b]&&r[a+c]==r[b+c];}int n,a[maxn];void da(int *r,int m){ int i,j,p,*x=wa,*y=wb; for(i=0;i=0;i--)sa[-- 阅读全文