【白书之路】401 - Palindromes 回文串 镜像串

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

palindrome 

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 right to left.


A mirrored string is a string for which when each of the elements of the string is changed to its reverse (if it has a reverse) and the string is read backwards the result is the same as the original string. For example, the string "3AIAE" is a mirrored string because "A" and "I" are their own reverses, and "3" and "E"are each others' reverses.


A mirrored palindrome is a string that meets the criteria of a regular palindrome and the criteria of a mirrored string. The string "ATOYOTA" is a mirrored palindrome because if the string is read backwards, the string is the same as the original and because if each of the characters is replaced by its reverse and the result is read backwards, the result is the same as the original string. Of course, "A""T""O", and "Y"are all their own reverses.


A list of all valid characters and their reverses is as follows.


镜像回文串 一.题目 习题 输入一个字符,判断它是否为回文串以及镜像。 输入字符保证不含数字0。 所谓 回文串,就是反转以后和原相同,如abba和madam。 所有镜像,就是左右镜像之后和原相同,如2S和3AIAE。 注意,并不是每个字符在镜像之后都能得到一个合法字符。 样例输入: NOTAPALINDROME ISAPALINILAPASI 2A3MEAS ATOYOTA 样 阅读详情

相关推荐

『杭电1318』Palindromes

Problem Description 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 r

漠宸离若的博客 454

uva 401

#include #include #define N 30 char ch[50]="AAE3HHIIJLLJMMOOS2TTUUVVWWXXYYZ5112S3E5Z88";//0、2、4为原字符 int len=strlen(ch); int is_palindrome(char * a) { int i; int ok=1; int n=strlen(a); for(i=0;i<

Beyond The Sky 608

算典03_例题_03_HDU-1318

**判断一个字符是否为回文串镜像** **回文串的意思就不用说了,正着反着相等就行了** **镜像就是根据上面给出的表格将原转换过去,得到的新的字符如果和原是逆过来相等的,它就是镜像** **这里我觉得对应关系有很多,使用常量数组即可使其对应起来** **结果也保存在常量数组里,方便输出**

duaduac.com 527

uva 401 Palindromes

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=6&page=show_problem&problem=342   Palindromes  A regular palindrome is a string of numbers or letter

chenjun5845209的专栏 577

A. Prefix and Suffix Array

补题

Selfishness_x的博客 429

例题3-3 回文词(Palindromes,UVa401

3-3 例题3-3 回文词(Palindromes,UVa401)输入一个字符,判断它是否为回文串以及镜像。输入字符保证不含数字0。所谓回文串,就是反转以后和原相同,如abba和madam。所有镜像,就是左右镜像之后和原相同,如2S和3AIAE。注意,并不是每个字符在镜像之后都能得到一个合法字符。在本题中,每个字符的镜像如图3-3所示(空白项表示该字符镜像后不能得到一个合法字符)。输入...

qq_23034691的博客 518

UVa401_Palindromes(小白书字符专题)

Description   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

_nplus 1102

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...

古古古古古古 514

UVA 401

第一次写博客,好激动啊!!!! 这个题最开始我是从网上找大神们的解题思路学着写完的,感觉这道题虽然很水,但是不去仔细读题很难AC,有很多地方不读题就会错。 最令我记忆犹深的是有两个地方, 1。回文串和回文镜像的判断,由于没有好好读题,导致我把程序写成了:只要先满足回文串再满足所有字符都是镜像符,这个字符就是回文镜像了,结果我错了N次都没找到问题,可见读题的重要性。 2.关于单个字符的判定

qq_35859033的博客 382

【UVa】[401]Palindromes

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

BoilTask Talk Show 771

2018 ACM-ICPC北京赛区 Palindromes 【回文数】

题目传送门 时间限制:1000ms 单点时限:1000ms 内存限制:512MB 描述 Recently, Nvoenewr learnt palindromes in his class. A palindrome is a nonnegative integer that is the same when read from left to right and when read ...

君兮月影的博客 658

Palindrome

Palindrome Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 46005   Accepted: 15688 Description A palindrome is a symmetrical string, th

ToBeYours的博客 610

【Gym - 101498H Palindrome Number】 思维

H - Palindrome Number A palindrome number is a number that can be read the same way from left to right and from right to left. For example: 961169, 111, 554455 are palindromes,

于心有愧丶 1364

401 - Palindromes(回文串水题)

VJ上交题地址:https://vjudge.net/problem/UVA-401 Description A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string"ABCDEDCBA"is a palin...

weixin_30553837的博客 188

uva401 - 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

uva code 1723

刷紫书第三章例题(例题3-1,3-2,3-3)

例题3-1 TEX Quotes UVA - 272TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Be

ccnuacmhdu的博客 784

回文词

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 l

wangcaiyunwangcaiyun的博客 379

字符的回文与镜像

给你一个字符,如何判断这个字符是不是回文串镜像。 看试一道很简单的题,但真正能把握住这道题却很难! 下面介绍三种方法,各有亮点:   第一种方法:先把可以镜像的字符用Hash表给存储起来,给出的字符的一半入栈,如果这个字符的长度为奇数,则这个字符中间这个字符如果镜像后的字符和原来不相同,则这个字符肯定不是镜像字符,然后每次出栈一个,和下一个字符进行对比,如果出栈的...

aizhi0169的博客 366
上一篇: 【白书之路】10082 - WERTYU string使用
下一篇: 【白书之路】340 - Master-Mind Hints 数字统计
colorfulshark
博客等级 码龄15年 631粉丝 459原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值