UVAlive 4670 Dominating Patterns 题目: Dominating Patterns Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu Submit Status Description The archaeologists are going to decipher a very mysterious ``language". Now, they kno…
题目链接 //删掉一个单词需要前移一段位置,用链表维护就好了 复杂度O(sum(len)) #include <cstdio> #include <cstring> #define S 26 const int N=1e5+7; int n; char s[N],p[N]; struct AC_Automaton { int cnt,son[N][S],fail[N],pos[N],q[N],dep[N]; bool val[N]; struct List { int l,r; }…