题目描述

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相关推荐

  1. GYM 101350 I. Mirrored String II

    I. Mirrored String II 题目描述 Note: this is a harder version of Mirrored string I. The gorillas have re ...

  2. gym 102875 H. Happy Morse Code

    gym 102875 H. Happy Morse Code 题意: 一个长度为n的字符串,现在给你m个小字符串,问小字符串拼成大字符串有多少种方法? 答案mod128 题解: 其实也不难,但是本人对 ...

  3. Mirrored String I Gym - 101350H (水)判断回文

    https://vjudge.net/contest/159763#problem/H 判断是不是由指定字符组成的回文串 // // main.cpp // 160929 // // Created ...

  4. Gym - 101350I - Mirrored String II (马拉车)

    题意: 求最长回文子串,但每个字母也必须是回文的 思路: 马拉车,但奇数长度的回文串需要特判 #include <bits/stdc++.h> using namespace std; c ...

  5. Codeforces Gym 100114 H. Milestones 离线树状数组

    H. Milestones Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100114 Descripti ...

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

  7. C++ #include iostream #include iostream.h #include string.h区别及作用

    一般的:iostream.h里面定义的所有类以及对象都是在全局空间里,所以你可以直接用cout . 但在iostream里面,它所定义的东西都在名字空间std里面,所以你必须加上using names ...

  8. 头文件 string.h cstring string 区别

    1. #include <cstring>   //不可以定义string s:可以用到strcpy等函数 using   namespace   std; #include <st ...

  9. Ler(一) stdlib.h,stdio.h,string.h头文件

    一.定位不同 1.stdlib.h是standard library标准库头文件,定位在通用工具函数. 2.stdio.h是standard input&output标准输入输出头文件,定位在 ...

最新文章

  1. Eclipse中新建WEB项目,JSP页面报错。
  2. python 装饰器 参数-[Python]写个带参数的装饰器
  3. 拿着5家offer的Java,对面试官做了什么?
  4. android远程linux命令,测试可用的Android远程语音识别实例
  5. 如何用AnySDK快速接入SDK上线
  6. Centos6.5 Couchdb安装
  7. linux关闭网卡休眠_CentOS_Linux常用实用指令整理三:高级指令
  8. java web学习总结(二十一) -------------------模拟Servlet3.0使用注解的方式配置Servlet...
  9. mysql 清理表碎片需要停止数据库吗_Mysql的表的碎片清理
  10. Asp.net报错汇总:回发或回调参数无效
  11. 《大电机技术》期刊简介
  12. 如何看待花呗接入央行个人征信?
  13. 【分享】ArcGIS实现分子分母等标注实用技巧
  14. iPad浏览器HTML5性能测试
  15. 【电商】管理后台之账号管理
  16. 外包程序员,如何提高自己跳出外包圈子?
  17. 红外成像光电探测器的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
  18. 无线衰落信道的分类方式和选择性衰落条件
  19. 05_Java筑基之Java开发初体验
  20. 股票 汇率 基金 手机号码 天气 等 常用免费接口

热门文章

  1. 盘点4种微信营销如何快速吸粉的方法
  2. 首届中阳验方节即将举办,失传多年的国宝级验方重见天日
  3. 垃圾分类之上传一张图片进行测试
  4. 数据库类型为BLOB图片,前台显示问题。
  5. 神经网络文本分类技术实践总结
  6. 【MM VS价】移动平均价V标准价格S(一)
  7. AI芯片:寒武纪DaDianNao结构分析
  8. 纯JS+HTML+CSS实现表格增删改查翻页--模板文件管理
  9. 谁说码农不懂浪漫?(js写的'老婆生日快乐'特效)
  10. python locust学习笔记