#include <iostream> #include <string> #include <cstdio> #include <cctype> #pragma warning(disable:4996) using namespace std; string str = "A 3 HIL JM O 2TUVWXY51SE Z 8 ";//镜像串的特征,只有部分字母和数字有镜像 string out[] = { "啥都不是&q…
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4110 题目: BaoBao has just found two strings and in his left pocket, where indicates the -th character in string , and indicates the -th character in string . As BaoBao is bored, he de…
Palindromic characteristics of string s with length |s| is a sequence of |s|integers, where k-th number is the total number of non-empty substrings of s which are k-palindromes. A string is 1-palindrome if and only if it reads the same backward as fo…
题意 给一个字符串 判定其是否为回文串和镜像串 回文串非常好推断 镜像串对于每个字符用数组保存它的镜像字符即可了 没有的就是空格 注意若字符串长度为奇数 中间那个字母必须是对称的才是镜像串 #include<cstdio> #include<cctype> #include<cstring> const int N = 35; int l; char s[N], mc[] = "A 3 HIL JM O 2TUVWXY5", mn[]…
[转载请注明]http://www.cnblogs.com/igoslly/p/8726771.html 来看一下题目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "bab" Note: "aba"…