摘要: 题目链接:https://www.luogu.com.cn/problem/P1659 思路: 首先跑一遍Manacher,用$cnt_i$记录长为$i$的回文串有多少个。 所记录的$cnt$并不是最终的$cnt$,如$cnt_1$在$cnt_2$中也有,可用$sum=cnt_1+cnt_2$,然后 阅读全文
posted @ 2020-02-17 22:04 dfydn 阅读(237) 评论(0) 推荐(0)