一直WA--找了半天错的发现居然是解密那里的mask其实是不能动的--传进去的会变,但是真实的那个不会变-- 然后就是后缀自动机,用LCT维护parent树了--注意不能makeroot,因为自动机的根是不会变的(同理也不能翻转区间),其实就是低配LCT(?) #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int N=3000005; int q,n,m,…
A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called factor, is a consecutive sequence of characters occurrences at least once in a string. Now your task i…