Coder-Strike 2014 - Finals (online edition, Div. 2) B. Start Up
需要满足的条件是
(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的更多相关文章
- Coder-Strike 2014 - Finals (online edition, Div. 2) A. Pasha and Hamsters
水题 #include <iostream> #include <vector> #include <algorithm> using namespace std; ...
- 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 ...
- Coder-Strike 2014 - Finals (online edition, Div. 1)
CF 420A A. Start Up 题目链接: http://codeforces.com/problemset/problem/420/A 题目意思: 给一个字符串A,通过镜面反射后得到A', ...
- Bubble Cup 11 - Finals [Online Mirror, Div. 1]题解 【待补】
Bubble Cup 11 - Finals [Online Mirror, Div. 1] 一场很好玩的题啊! I. Palindrome Pairs 枚举哪种字符出现奇数次. G. AI robo ...
- 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 ...
- IndiaHacks 2016 - Online Edition (Div. 1 + Div. 2) E - Bear and Forgotten Tree 2 链表
E - Bear and Forgotten Tree 2 思路:先不考虑1这个点,求有多少个连通块,每个连通块里有多少个点能和1连,这样就能确定1的度数的上下界. 求连通块用链表维护. #inclu ...
- 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 ...
- 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 ...
- 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 ...
随机推荐
- redis 列出所有的键
> KEYS * (empty list or set)
- 数据结构和算法 – 10.集合
集合: 联合.交叉.差异.子集 using System; using System.Collections; using System.Collections.Generic; using Syst ...
- .net学习之泛型、程序集和反射
一.泛型1.CLR编译时,编译器只为MyList<T>类型产生“泛型版”的IL代码——并不进行泛型的实例化,T在中间只充当占位符.例如:MyList 类型元数据中显示的<T> ...
- poj 2262【素数表的应用---判断素数】【哈希】
Goldbach's Conjecture Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 35214 Accepted: ...
- ora-01033:oracle initializationg or shutdown in progress 错误提示解决方法
1.进入CMD,执行set ORACLE_SID=fbms,确保连接到正确的SID:2.运行sqlplus "/as sysdba" SQL>shutdown immedia ...
- android 入门-Eclipse 费解的问题
1.第一次打开eclipse的时候 代码程序出好多红点.等待加载项目,如果加载完项目之后仍然存在,请重启eclipse. 2.如果你在创建页面中的button 的时候,设置了android:gravi ...
- wp8 入门到精通 Utilities类 本地存储+异步
public class CCSetting { public async static void AddOrUpdateValue<T>(string key, T value) { t ...
- 如何通过阅读C标准来解决C语言语法问题
有时候必须非常专注地阅读ANSI C标准才能找到某个问题的答案.一位销售工程师把下面这段代码作为测试用例发给Sun的编译小组. foo(const char **p) {} int main(int ...
- c语言的字符串操作(比较详细)
1)字符串操作 strcpy(p, p1) 复制字符串 strncpy(p, p1, n) 复制指定长度字符串 strcat(p, p1) 附加字符串 strncat(p, p1, n) 附加指定长度 ...
- Codeforces Round #212 (Div. 2) D. Fools and Foolproof Roads 并查集+优先队列
D. Fools and Foolproof Roads You must have heard all about the Foolland on your Geography lessons. ...