GYM 101350 H. Mirrored String I
题目描述
The gorillas have recently discovered that the image on the surface of the water is actually a reflection of themselves. So, the next thing for them to discover is mirrored strings.
A mirrored string is a palindrome string that will not change if you view it on a mirror.
Examples of mirrored strings are “MOM”, “IOI” or “HUH”. Therefore, mirrored strings must contain only mirrored letters {A, H, I, M, O, T, U, V, W, X, Y} and be a palindrome.
e.g. IWWI, MHHM are mirrored strings, while IWIW, TFC are not.
A palindrome is a string that is read the same forwards and backwards.
Can you tell if string S is a mirrored string?
输入
The first line of input is T – the number of test cases.
Each test case contains a non-empty string S of maximum length 1000. The string contains only uppercase English letters.
输出
For each test case, output “yes” (without quotes) if the string S is a mirrored string, otherwise output “no”.
样例
inputCopy
3
IOI
ARABELLA
RACECAR
outputCopy
yes
no
no
题意
简单的字符串。。
AC代码
GYM 101350 H. Mirrored String I相关推荐
- GYM 101350 I. Mirrored String II
I. Mirrored String II 题目描述 Note: this is a harder version of Mirrored string I. The gorillas have re ...
- gym 102875 H. Happy Morse Code
gym 102875 H. Happy Morse Code 题意: 一个长度为n的字符串,现在给你m个小字符串,问小字符串拼成大字符串有多少种方法? 答案mod128 题解: 其实也不难,但是本人对 ...
- Mirrored String I Gym - 101350H (水)判断回文
https://vjudge.net/contest/159763#problem/H 判断是不是由指定字符组成的回文串 // // main.cpp // 160929 // // Created ...
- Gym - 101350I - Mirrored String II (马拉车)
题意: 求最长回文子串,但每个字母也必须是回文的 思路: 马拉车,但奇数长度的回文串需要特判 #include <bits/stdc++.h> using namespace std; c ...
- Codeforces Gym 100114 H. Milestones 离线树状数组
H. Milestones Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100114 Descripti ...
- ACM-ICPC 2018 焦作赛区网络预赛 H题 String and Times(SAM)
Now you have a string consists of uppercase letters, two integers AA and BB. We call a substring won ...
- C++ #include iostream #include iostream.h #include string.h区别及作用
一般的:iostream.h里面定义的所有类以及对象都是在全局空间里,所以你可以直接用cout . 但在iostream里面,它所定义的东西都在名字空间std里面,所以你必须加上using names ...
- 头文件 string.h cstring string 区别
1. #include <cstring> //不可以定义string s:可以用到strcpy等函数 using namespace std; #include <st ...
- Ler(一) stdlib.h,stdio.h,string.h头文件
一.定位不同 1.stdlib.h是standard library标准库头文件,定位在通用工具函数. 2.stdio.h是standard input&output标准输入输出头文件,定位在 ...
最新文章
- Eclipse中新建WEB项目,JSP页面报错。
- python 装饰器 参数-[Python]写个带参数的装饰器
- 拿着5家offer的Java,对面试官做了什么?
- android远程linux命令,测试可用的Android远程语音识别实例
- 如何用AnySDK快速接入SDK上线
- Centos6.5 Couchdb安装
- linux关闭网卡休眠_CentOS_Linux常用实用指令整理三:高级指令
- java web学习总结(二十一) -------------------模拟Servlet3.0使用注解的方式配置Servlet...
- mysql 清理表碎片需要停止数据库吗_Mysql的表的碎片清理
- Asp.net报错汇总:回发或回调参数无效
- 《大电机技术》期刊简介
- 如何看待花呗接入央行个人征信?
- 【分享】ArcGIS实现分子分母等标注实用技巧
- iPad浏览器HTML5性能测试
- 【电商】管理后台之账号管理
- 外包程序员,如何提高自己跳出外包圈子?
- 红外成像光电探测器的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
- 无线衰落信道的分类方式和选择性衰落条件
- 05_Java筑基之Java开发初体验
- 股票 汇率 基金 手机号码 天气 等 常用免费接口