水题。

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi = acos(-1.0), eps = 1e-;
void File()
{
freopen("D:\\in.txt", "r", stdin);
freopen("D:\\out.txt", "w", stdout);
}
inline int read()
{
char c = getchar(); while (!isdigit(c)) c = getchar();
int x = ;
while (isdigit(c)) { x = x * + c - ''; c = getchar(); }
return x;
} char s[];
int f[][]; void init()
{
f['A']['A']=; f['b']['d']=; f['d']['b']=; f['H']['H']=;
f['I']['I']=; f['M']['M']=; f['O']['O']=; f['o']['o']=;
f['p']['q']=; f['q']['p']=; f['T']['T']=; f['U']['U']=;
f['V']['V']=; f['v']['v']=; f['W']['W']=; f['w']['w']=;
f['X']['X']=; f['x']['x']=; f['Y']['Y']=;
} int main()
{
memset(f,,sizeof f); init();
scanf("%s",s); bool fail=;
int len=strlen(s);
for(int i=;i<=len/;i++) if(f[s[i]][s[len-i-]]==) fail=;
if(fail) printf("NIE\n"); else printf("TAK\n");
return ;
}

Codeforces 691B s-palindrome的更多相关文章

  1. 【模拟】Codeforces 691B s-palindrome

    题目链接: http://codeforces.com/problemset/problem/691/B 题目大意: 求一个字符串是不是镜像的(不是回文).是输出TAK否则RE. 题目思路: [模拟] ...

  2. CodeForces - 600C Make Palindrome 贪心

    A string is called palindrome if it reads the same from left to right and from right to left. For ex ...

  3. Codeforces Round 486C - Palindrome Transformation 贪心

    C. Palindrome Transformation time limit per test 1 second memory limit per test 256 megabytes input ...

  4. Codeforces Gym100952 C. Palindrome Again !!-回文字符串 (2015 HIAST Collegiate Programming Contest)

      C. Palindrome Again !!   time limit per test 1 second memory limit per test 64 megabytes input sta ...

  5. codeforces 600C Make Palindrome

    要保证变化次数最少就是出现次数为奇数的相互转化,而且对应字母只改变一次.保证字典序小就是字典序大的字母变成字典序小的字母. 长度n为偶数时候,次数为奇数的有偶数个,按照上面说的搞就好了. n为奇数时, ...

  6. codeforces 691B B. s-palindrome(水题)

    题目链接: B. s-palindrome 题意: 问给定的字符串是否是镜面对称; 思路: 直接看哪些字母是镜面对称的就行: AC代码: //#include <bits/stdc++.h> ...

  7. 【Codeforces 486C】Palindrome Transformation

    [链接] 我是链接,点我呀:) [题意] 光标一开始在p的位置 你可以用上下左右四个键位移动光标(左右)或者更改光标所在的字符(上下增加或减少ascill码) 问你最少要操作多少次才能使得字符串变成回 ...

  8. Codeforces 1304B. Longest Palindrome

    根据数据范围,暴力可以解决,对每一个串,找与其互为回文的串,或者判断自身是否为回文串,然后两两将互为回文的串排列在头尾,中间放且只能最多放一个自身为回文串的串,因为题目说每个串都是不同的 #inclu ...

  9. Codeforces Round #389 Div.2 D. Santa Claus and a Palindrome

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

随机推荐

  1. Python安装httplib2 0.9.2

    1.首先下载httplib2 0.9.2,下载地址: https://pypi.python.org/pypi/httplib2/#downloads 2.然后解压到Python27的安装目录下,将下 ...

  2. 1.Perl 多线程:Threads

    详情可查看: perldoc threads 调用线程的方法: $thr = threads->create(FUNCTION, ARGS) #This will create a new th ...

  3. php给数组key:value中的key加引号

    public function Ext_json_decode($str, $mode=false){ if(preg_match('/\w:/', $str)){ $str = preg_repla ...

  4. 《C++ Primer》之指向函数的指针

    函数指针是指指向函数而非指向对象的指针.像其他指针一样,函数指针也指向某个特定的类型.函数类型由其返回类型以及形参表确定,而与函数名无关: // pf points to function retur ...

  5. ASP.NET—013:实现带控件的弹出层(弹出框)

    http://blog.csdn.net/yysyangyangyangshan/article/details/38458169 在页面中用到弹出新页面的情况比较多的,一般来说都是使用JS方法sho ...

  6. eclipse中向左缩进快捷键

    总是忘记,还是记下来吧,以后查找方便 Shift + Tab    

  7. hdu_5690_All X(找循环节)

    题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5690 题意: Problem Description F(x, m)F(x,m) 代表一个全是由数字x ...

  8. HDU1272 小希的迷宫 并查集

    参考网址:http://blog.sina.com.cn/s/blog_6827ac4a0100nyjy.html 解题思路: 由于这里出现的数字不一定连续的数字都会出现,所以设一个mark来标记数字 ...

  9. 通过配置的方式Autofac(1)

    一.基本配置 1.通过配置的方式使用Autofac <?xml version="1.0"?> <configuration> <configSect ...

  10. Centos中压缩(zip)和解压(unzip)命令

    摘自:http://liuzhichao.com/p/681.html 1.我下载了一个yasuo.zip文件,想解压缩: # unzip yasuo.zip 2.我当前目录下有abc1.zip,ab ...