摘要:
"【SPOJ】Longest Common Substring II" 多个字符串求最长公共子串 还是将一个子串建SAM,其他字符串全部跑一边,记录每个点的最大贡献 由于是所有串,要对每个点每个字符串跑完后去最小值才是每个点的最终贡献 cpp include include include incl 阅读全文
摘要:
"【HDU4622】Reincarnation" 一眼似乎不可做,但发现$strlen(x)$很小,暴力$O(n^2)$预处理每个区间$(l,r)$,查询时$O(1)$输出就好了 cpp include include include include include typedef int LL; 阅读全文