摘要:
struct state { int len,link; int nxt[31]; }; char s[N]; int n,ans,t[N],a[N],b[N],O; struct SAM { state st[N*2]; int siz,last; void init() { for(int i= 阅读全文
摘要:
结构体封装的trie 之前TLE了很多次 原因是因为cnt用完没清空... #include <bits/stdc++.h> #define il inline #define re register using namespace std; const int N=3e6+10; il int r 阅读全文