随笔分类 - 字符串-manacher
摘要:题面:https://www.luogu.org/problem/P3501 cpp 本题直接hash+暴力,二分对称中心即可. 或者是manacher,通过观察反对称串长度一定是偶数,并且反对称串中相匹配的字符位置必定一奇一偶,所以直接把奇数位取反,偶数为不动,然后就变成了回文串问题. (自然溢出
阅读全文
摘要:```cpp include include include include include include include include using namespace std; const int N=51000005; char a[N]; int n,ans[N],anss,ma[N 2]
阅读全文

浙公网安备 33010602011771号