07 2020 档案
PAM
摘要:struct PAM { int ch[N][26], fail[N], len[N]; int tot, las; PAM() { len[0] = 0; len[1] = -1; fail[0] = 1; tot = 1; las = 0; } inline int gtfail(int x,
SAM模板
摘要:#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define R register #define LL long long const int inf = 0x3f3f3f3f; con