随笔分类 -  字符串-多项式匹配

摘要:https://www.luogu.com.cn/problem/P4173 \(NTT\) 按照套路,把模式串$A$倒过来(注:一下公式中的$A$为已经倒过来的串) 定义$'*'$值为$0$,$'a'\cdots 'z'$值为$1\cdots 26$ 若$B$串在$i$位置匹配,那么必然有: \[ 阅读全文
posted @ 2020-08-01 13:56 GK0328 阅读(85) 评论(0) 推荐(0)
摘要:https://www.luogu.com.cn/problem/CF528D 字符串匹配$/NTT$ 如果$k=0$,那么$KMP$轻松解决 当$k>0$时,我们可以对每个字符分别考虑 例如样例,用$'A'$去匹配: \[ AGCAATTCAT\\ ACAT \] 将模式串和文本串中非$'A'\( 阅读全文
posted @ 2020-08-01 12:38 GK0328 阅读(175) 评论(0) 推荐(0)