摘要:
利用回文串的「镜像」特点减少计算。 引理 0 设 $S$ 是一个长度为 $n+1$ 回文串,下标从 $0$ 开始;$T = S[l, r]$ 是 $S$ 的子串。$T$ 是回文串当且仅当 $S[n r, n l]$ 是回文串。 先考虑长度为奇数的回文子串(简称为「奇回文子串」),可以求出以每个下标为 阅读全文
「以解决问题为乐」
真的喜欢么?真的喜欢就去做吧。
Lost Boy Calling 。。。。
... Many of these issues are best dealt with at the algorithmic level, rather than by "tweaking" the code.
This is an obscurity that catches the unwary.
原来我什么都不懂。