随笔分类 -  字符串 - 回文自动机

摘要:Description Viruses are usually bad for your health. How about fighting them with... other viruses? In this problem, you need to find out how to synth 阅读全文
posted @ 2020-01-02 14:02 EM-LGH 阅读(144) 评论(0) 推荐(0)
摘要:建立一个回文自动机,然后开一个桶遍历一下回文树就好了. code: #include <cstdio> #include <vector> #include <string> #include <cstring> #include <algorithm> #define N 500007 using 阅读全文
posted @ 2020-01-02 08:09 EM-LGH 阅读(159) 评论(0) 推荐(0)
摘要:Code: 阅读全文
posted @ 2019-02-12 09:05 EM-LGH 阅读(239) 评论(0) 推荐(1)
摘要:主要是初始化那里需要注意一下. 然后不要忘记每次给 $last$ 节点的大小++ #include <cstdio> #include <string> #include <cstring> #include <algorithm> #define N 300008 #define ll long 阅读全文
posted @ 2019-02-11 11:37 EM-LGH 阅读(160) 评论(0) 推荐(1)