uva 401.Palindromes】的更多相关文章

题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342 题目意思:给出一段字符串(大写字母+数字组成).判断是否为回文串 or 镜像串 or 回文镜像串 or 什么都不是.每个字母的镜像表格如下 Character Reverse Character Reverse Character Reverse A A M M Y Y B…
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342 题目意思:判断一行字符串为以下四种的哪一种:A regular palindrome,A mirrored string,A mirrored palindrome 和 is not a palindrome.A regular palindrome 就是我们见得最多的普通回文…
 题意  给一个字符串 判定其是否为回文串和镜像串  回文串非常好推断  镜像串对于每个字符用数组保存它的镜像字符即可了  没有的就是空格 注意若字符串长度为奇数  中间那个字母必须是对称的才是镜像串 #include<cstdio> #include<cctype> #include<cstring> const int N = 35; int l; char s[N], mc[] = "A 3 HIL JM O 2TUVWXY5", mn[]…
1.题目大意 输入字符串,判断其是否为回文串或镜像串.其中,输入的字符串中不含0,且全为合法字符.以下为所有的合法字符及其镜像: 2.思路 (1)考虑使用常量数组而不是if或switch来实现对镜像的判断,由此避免过于繁琐的过程. (2)" -- is not a palindrome."," -- is a mirrored string."," -- is a regular palindrome."," -- is a mirro…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 如果一个字符没有对应的镜像,那么它对应的是一个空格. 然后注意 aba这种情况. 这种情况下b也要查一下它的镜像是不是和b一样. [错的次数] 在这里输入错的次数 [反思] 在这里输入反思 [代码] #include <bits/stdc++.h> using namespace std; const char * rev = {"A 3 HIL JM O 2TUVWXY51SE Z 8 "}; const…
​ A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is read from…
白书一:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=64609#overview 注意UVA没有PE之类的,如果PE了显示WA. UVA401:Palindromes #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namesp…
  Palindromes  A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string…
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/B A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when t…
管他什么rev数组,msg数组简化代码 #define _CRT_SECURE_NO_WARNINGS #include <cmath> #include <iostream> #include <stdio.h> #include<algorithm> #include <map> #include <cstring> #include <time.h> #include <string> using nam…