个人记录子序列自动机~ #include<bits/stdc++.h> using namespace std; const int N = 1e6+10; int lst[26], nxt[N][26]; /* a b c c c(abcdefghij.. = -1) */ void work()…