• 2024-09-08BZOJ 3796 Mushroom追妹纸 题解
    Statement给\(s_1,s_2,s_3\),求最长的\(w\)的长度,满足\(w\)是\(s_1\)子串\(w\)是\(s_2\)子串\(s_3\)不是\(w\)子串Solution1以下是我没看题解瞎胡的首先一个弱智想法是,枚举\(s_1\)上\(w\)的左端点,二分右端点,判定时\(s_2\)用SAM,\(s_3\)用单串AC自动
  • 2024-09-05luogu P3808/3796
    首先Trie树:#include<bits/stdc++.h>usingnamespacestd;intT,q,n,t[3000005][65],cnt[3000005],idx;chars[3000005];intgetnum(charx){if(x>='A'&&x<='Z')returnx-'A';elseif(x>='a