水题。

#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. URL Scheme吊起app实现另外一种登录方式

    https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/ ...

  2. MFC下调试日志的打印

    最近项目出现点小Bug,需要调试跟踪代码,于是乎写了份打印日志的代码. CLogFile.h文件 #if !defined(AFX_LOGFILE_H__288388CA_9A3E_4F3D_A2B8 ...

  3. VBS 选择文件夹框

    VBS 选择文件夹框   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 on error resume Next Const  ...

  4. Linux系统监控实用工具Glances

    Linux系统监控实用工具Glances Glances安装 Glances安装要求:python >= 2.6 和 psutil >= 0.4.1 1.第一步,安装了python-> ...

  5. 类型“GridView”的控件必须放在具有 runat=server 的窗体标记内?

    Response.AddHeader("content-disposition", "attachment;filename=CRM.xls") Respons ...

  6. div+css位置绝对定位和相对定位

    position:absolute: 当div中被隔着些元素的话那么用此方法将把元素重叠在一起,所以元素可以不在容器中加也能重叠在一起

  7. 更改web project 访问项目名称

    1.新建web project 2.右键该项目名称------properties 3.访问该项目的URL http://localhost:8806/ssm/.......... 相比书写整个项目名 ...

  8. List------Linked 链表

    1.Definition Linked list consists of a series of nodes. Each nodes contains the element and a pointe ...

  9. nefu 899这也是裸的找

    #include <iostream> #include <algorithm> #include <cstdio> using namespace std; in ...

  10. angular、bootstrap初稿搭建

    1.bootstrap3.0中,ie8不兼容响应式设计 @media,需要添加如下2个查件 <!-- html5.js for IE less than 9 -->     <!-- ...