需要满足的条件是

(1)每个字母是对称的

(2)每个字符串是对称的

  1. #include <iostream>
  2. #include <algorithm>
  3. #include <string>
  4. using namespace std;
  5. const string mirrorChar = "AHIMOTUVWXY";
  6. int main(){
  7. string str;
  8. cin >> str;
  9. bool flag = true;
  10. for(int i = ; i < str.length(); ++ i){
  11. if(mirrorChar.find(str[i])==string::npos) {
  12. flag = false;break;
  13. }
  14. }
  15. if(flag && str == string(str.rbegin(),str.rend())) cout<<"YES"<<endl;
  16. else cout<<"NO"<<endl;
  17. }

Coder-Strike 2014 - Finals (online edition, Div. 2) B. Start Up的更多相关文章

  1. Coder-Strike 2014 - Finals (online edition, Div. 2) A. Pasha and Hamsters

    水题 #include <iostream> #include <vector> #include <algorithm> using namespace std; ...

  2. Coder-Strike 2014 - Finals (online edition, Div. 2) C题

    C. Online Meeting time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  3. Coder-Strike 2014 - Finals (online edition, Div. 1)

    CF 420A  A. Start Up 题目链接: http://codeforces.com/problemset/problem/420/A 题目意思: 给一个字符串A,通过镜面反射后得到A', ...

  4. Bubble Cup 11 - Finals [Online Mirror, Div. 1]题解 【待补】

    Bubble Cup 11 - Finals [Online Mirror, Div. 1] 一场很好玩的题啊! I. Palindrome Pairs 枚举哪种字符出现奇数次. G. AI robo ...

  5. IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) B. Bear and Compressing

    B. Bear and Compressing 题目链接  Problem - B - Codeforces   Limak is a little polar bear. Polar bears h ...

  6. IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) E - Bear and Forgotten Tree 2 链表

    E - Bear and Forgotten Tree 2 思路:先不考虑1这个点,求有多少个连通块,每个连通块里有多少个点能和1连,这样就能确定1的度数的上下界. 求连通块用链表维护. #inclu ...

  7. IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) E. Bear and Forgotten Tree 2 bfs set 反图的生成树

    E. Bear and Forgotten Tree 2 题目连接: http://www.codeforces.com/contest/653/problem/E Description A tre ...

  8. IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) D. Delivery Bears 二分+网络流

    D. Delivery Bears 题目连接: http://www.codeforces.com/contest/653/problem/D Description Niwel is a littl ...

  9. IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) C. Bear and Up-Down 暴力

    C. Bear and Up-Down 题目连接: http://www.codeforces.com/contest/653/problem/C Description The life goes ...

随机推荐

  1. CLR via C#(13)-浅谈事件

    提起事件,我们都不陌生,事件使类之间有了交互的能力.它是建立在委托基础上的.有了前面对委托的了解,相信读起事件来也不会太难了.关于事件,现成的好文章数不胜数,本不打算写了.不过问道有先后,各抒己见,也 ...

  2. WMI测试

    https://social.msdn.microsoft.com/Forums/windowshardware/zh-CN/c5af7959-95d3-4e1b-ab40-96a2a31c2af2/ ...

  3. Oracle数据库备份与还原操作具体步骤

    Oracle数据库导出操作 导入导出都要进行目录创建与授权. 在pl/sql里面编写也可以 select * from dba_directories(这个是查看创建的目录) drop directo ...

  4. php调用phpqrcode.php生成二维码

    下载phpqrcode.php 下载地址: http://files.cnblogs.com/files/qhorse/phpqrcode.rar qrcode.php文件: <?php inc ...

  5. [v9] 列表页 调用 正文内容 或 自定义 字段(moreinfo的调用方法)

    "才能使用的字段) id content readpoint groupids_view paginationtype maxcharperpage template paytype all ...

  6. unfortunately launcher has stopped

    设定虚拟机的配置.

  7. Codeforces Round #369 (Div. 2) D. Directed Roads dfs求某个联通块的在环上的点的数量

    D. Directed Roads   ZS the Coder and Chris the Baboon has explored Udayland for quite some time. The ...

  8. felx项目属性(二)

    order flex-grow flex-shrink flex-basis flex align-self 1.1 order css order属性规定了弹性容器中的可伸缩项目在布局时的顺序.元素 ...

  9. T-SQL 基础编程

    Ø Go批处理语句 用于同时执行多个语句 Ø 使用.切换数据库 use master go Ø 创建.删除数据库 方法1. --判断是否存在该数据库,存在就删除 if (exists (select ...

  10. BurpSuite的使用总结

    BurpSuite BurpSuite 是一款使用Java编写的,用于Web安全审计与扫描套件.它集成了诸多实用的小工具以完成http请求的转发/修改/扫描等,同时这些小工具之间还可以 互相协作,在B ...