Finding Palindromes Time Limit: 10000MS Memory Limit: 262144K Total Submissions:4710 Accepted: 879 Case Time Limit: 2000MS Description A word is called a palindrome if we read from right to left is as same as we read from left to right. For examp…
题目链接:https://vjudge.net/problem/POJ-3376 Finding Palindromes Time Limit: 10000MS Memory Limit: 262144K Total Submissions: 4244 Accepted: 796 Case Time Limit: 2000MS Description A word is called a palindrome if we read from right to left is as sam…
Finding Palindromes http://poj.org/problem?id=3376 Time Limit: 10000MS Memory Limit: 262144K Case Time Limit: 2000MS Description A word is called a palindrome if we read from right to left is as same as we read from left to right. For example…
模板—字符串—Manacher Code: #include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define N 11000010 int len[N<<1],n,ans; char str[N],s[N<<1]; long long sum; namespace Manacher { int init(char *str) { int n…
题意 给一个字符串 判定其是否为回文串和镜像串 回文串非常好推断 镜像串对于每个字符用数组保存它的镜像字符即可了 没有的就是空格 注意若字符串长度为奇数 中间那个字母必须是对称的才是镜像串 #include<cstdio> #include<cctype> #include<cstring> const int N = 35; int l; char s[N], mc[] = "A 3 HIL JM O 2TUVWXY5", mn[]…