HDU3948 The Number of Palindromes
传送门
题意:给出一个字符串,问你有多少个本质不同的回文子串。
题解:
理论上有3种做法,我只写了回文自动机和manacher。
这两个东西的坑我迟早会补上的
回文自动机:建完之后根据我抄的建树方法输出节点数-1即可。
#include<cstdio>
#include<cstring>
#include<algorithm>
#define LL long l...
原创
2018-12-26 12:45:53 ·
245 阅读 ·
0 评论