需要满足的条件是

(1)每个字母是对称的

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

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
const string mirrorChar = "AHIMOTUVWXY";
int main(){
string str;
cin >> str;
bool flag = true;
for(int i = ; i < str.length(); ++ i){
if(mirrorChar.find(str[i])==string::npos) {
flag = false;break;
}
}
if(flag && str == string(str.rbegin(),str.rend())) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

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. WCF分布式开发必备知识(3):Web Service 使用

    参考地址:http://www.cnblogs.com/zhili/p/WebService.html 一.WebService概述 SOAP.WSDL.UDDISOAP(Simple Object ...

  2. MVC4 遇到问题总结

    1.路径编写: 举例1.<img  src="../Login/VailCode" width="108" height="40"&g ...

  3. xml解析方法总结

    ==========================================xml文件<?xml version=”1.0″ encoding=”GB2312″?> <RES ...

  4. AOP常用术语

    1.连接点(Joinpoint) 程序执行的某个特定位置:如类开始初始化前,类初始化后,类某个方法调用前,调用后,方法跑出异常后.一个类或一段程序代码拥有一些具有边界性质的特定点.这些代码中的特定点就 ...

  5. android 入门-生命周期 activity

    生命周期 activity http://blog.csdn.net/android_tutor/article/details/5772285 http://www.cnblogs.com/John ...

  6. LeetCode——Single Number(找出数组中只出现一次的数)

    问题: Given an array of integers, every element appears twice except for one. Find that single one. No ...

  7. 通讯录(ios自带有界面)

    1.添加AddressBookUI.framework框架 2控制器中实现 #import "ViewController.h" #import <AddressBookUI ...

  8. 【pom.xml 依赖】使用net.sf.json-lib-2.4-jdk15.jar所需要的其他依赖架包 以及其一直在pom.xml报错的问题

    特此声明: json-lib-2.4-jdk15.jar仅它本身不够,必须如下的几个依赖架包都有才能使用!!! 首先 将.json-lib-2.4-jdk15.jar以及其相关的依赖架包的正确配置给出 ...

  9. 在Android上用AChartEngine轻松绘制图表

    本文由 伯乐在线 - LeonHover 翻译.未经许可,禁止转载!英文出处:jaxenter.欢迎加入翻译组. Android发布不久的2008年底,开发者们已经开始寻找制表.制图.绘图的工具库.当 ...

  10. flex弹性布局

    Flex 布局教程:语法篇  原文地址:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_source=tuicool 作者:  ...