相关链接
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4641
神犇题解:http://blog.csdn.net/neither_nor/article/details/52218134
解题报告
据说可以KMP,具体可以看这里:传送门
不过,考虑一个更优美的做法:
这题显然可以转化为带通配符的字符串匹配问题
于是我们再撸一发FFT就可以了!
什么?复杂度过不去?
那我也没办法 _(:з」∠)_
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4641
神犇题解:http://blog.csdn.net/neither_nor/article/details/52218134
据说可以KMP,具体可以看这里:传送门
不过,考虑一个更优美的做法:
这题显然可以转化为带通配符的字符串匹配问题
于是我们再撸一发FFT就可以了!
什么?复杂度过不去?
那我也没办法 _(:з」∠)_
Dead indited written content, appreciate it for information .
Aw, this was a really nice post. In idea I would like to put in writing like this additionally – taking time and actual effort to make an excellent article… but what can I say… I procrastinate alot and under no circumstances appear to get one thing done.