洛谷. 4696. [CEOI2011]Matching(KMP 树状数组)
给定一个$1\sim n$的排列$p_i$和长为$m$的序列$h_i$,求$h$有多少个字串匹配$p$。$A$匹配$p$指:$A,p$等长且将$A$从小到大排序后,依次为$A_{p_1},A_{p_2},...,A_{p_n}$。
$n,m\leq 10^6$。
------------------------------------------------------------------------------------------------------------------------
很久以前的奇怪但现在依旧成立的签名
attack is our red sun $$\color{red}{\boxed{\color{red}{attack\ is\ our\ red\ sun}}}$$ ------------------------------------------------------------------------------------------------------------------------
很久以前的奇怪但现在依旧成立的签名
attack is our red sun $$\color{red}{\boxed{\color{red}{attack\ is\ our\ red\ sun}}}$$ ------------------------------------------------------------------------------------------------------------------------