题目链接:https://ac.nowcoder.com/acm/contest/33540/A
此题为manacher算法的变形,利用了算法的一部分性质,还用到了差分求前缀和。
题目链接:https://www.luogu.com.cn/problem/P3805
此题纯为manacher的模板题;
题一代码:
1 #include
2 #include
3 #include
4 #include
5 #include
题二代码:
1 #include
2 #include
3 #include
4 #include
5 #include