需要满足的条件是

(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. MangoDB的C#Driver驱动简单例子

    以下是本人学习C#Driver驱动简单的学习例子.GridFS的增删查操作 和 表的增删查改操作. public class MongoServerHelper { public static str ...

  2. MongoDB基本命令

    1.  启动和停止MongoDB: 执行mongod命令启动MongoDB服务器.mongod有很多可配置的选项,我们通过mongod --help可以查看所有选项,这里仅介绍一些主要选项:    - ...

  3. Delphi中弹出提示框的四种方法

    参考:http://blog.itpub.net/8432156/viewspace-924843/ 更为详细的内容请参见:http://blog.csdn.net/akof1314/article/ ...

  4. 【译】DotNet 5.4或者说 .NET平台标准

    原文:DotNet 5.4 or .NET Platform Standards 是的,你看到的确实是"DotNet 5.4".使用Visual Studio 2015 RC1 u ...

  5. Linux环境下stl库使用(map)

    例子1: testMap.cpp #include <string.h> #include <iostream> #include <map> #include & ...

  6. Visual Studio Code 1.0发布:100+语言,300+pull请求,1000+扩展

    在第一个预览版发布一年后,微软发表了Visual Studio Code 1.0. 在//BUILD 2015大会上,微软宣布,他们的一个团队需要几个月来创建Visual Studio Code的第一 ...

  7. TCP 连接中断的判断

    关于TCP 3次握手,4次分手就不多说了.如何判断TCP连接是否中断是个大问题. 1 TCPKeep-alive 机制 并不是TCP 规范的一部分,实现细节差距大. 2 使用heartbeat 检测 ...

  8. [荐]js模版引擎handlebars.js

    [官方介绍:http://handlebarsjs.com/] Handlebars provides the power necessary to let you build semantic te ...

  9. POJ 1984 Navigation Nightmare 带全并查集

    Navigation Nightmare   Description Farmer John's pastoral neighborhood has N farms (2 <= N <= ...

  10. 标准MDL方法修改Page、NonPage内存的属性

    typedef struct _REPROTECT_CONTEXT { PMDL   Mdl; PUCHAR LockedVa; } REPROTECT_CONTEXT, * PREPROTECT_C ...