摘要: ```cpp #include #include #include using namespace std; using ULL = unsigned long long; // 字符串哈希(注意 get(l,r)为闭区间,字符串下标从1开始) struct StringHash { vector 阅读全文
posted @ 2023-07-27 20:38 O2iginal 阅读(20) 评论(0) 推荐(0)
摘要: ```cpp #include #include #include using namespace std; // O(n) 计算字符串s的每个字符的最大回文半径,返回最长回文子串长度 int Manacher(string s) { // 空字符串直接返回0 if (s.length() == 0 阅读全文
posted @ 2023-07-27 19:26 O2iginal 阅读(17) 评论(0) 推荐(0)