题目: BZOJ2565 分析: 首先看到回文串,肯定能想到Manacher算法.下文中字符串\(s\)是输入的字符串\(str\)在Manacher算法中添加了字符'#'后的字符串 (构造方式如下) string s = "#"; for (int i = 0; i < str.size(); i++) { s += str[i]; s += '#'; } 如果用\(maxl_i\)表示以第\(i\)个字符结尾的最长回文串的长度,\(maxr_i\)表示以第\(i\)个字符开头…
Palindrome Time Limit:15000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, &quo…