April Fools Contest 2017 D
Description
The only line of the input contains a string of digits. The length of the string is between 1 and 10, inclusive.
Output "Yes" or "No".
373
Yes
121
No
436
Yes
看是不是回文(436中4,6盲文对称)
#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std; int s[]={,-,-,-,,,,-,,};
char st[]; int main()
{
scanf("%s",st+);int n=strlen(st+);
for(int i=,j=n;i<j;i++,j--)
if(st[i]!=st[j]&&s[st[i]-'']!=st[j]-'') return *puts("No");
if(n&){if(st[n/+]!=''&&st[n/+]!='')return *puts("No");}
puts("YES");
return ;
}
April Fools Contest 2017 D的更多相关文章
- April Fools Contest 2017 题解&源码(A,数学 B,数学 C,数学 D,字符串 E,数字逻辑 F,排序,卡时间,G,数学)
A. Numbers Joke time limit per test:2 seconds memory limit per test:64 megabytes input:standard inpu ...
- Codeforces April Fools Contest 2017
都是神题,我一题都不会,全程听学长题解打代码,我代码巨丑就不贴了 题解见巨神博客 假装自己没有做过这套
- April Fools Contest 2017 题解
趁着上课无聊,来补一补-- A. Numbers Joke 直接oeis就好了:http://oeis.org/search?q=numbers+joke&language=english&a ...
- April Fools Contest 2017 F
Description You are developing a new feature for the website which sells airline tickets: being able ...
- April Fools Contest 2017 E
Description Input The input consists of four lines, each line containing a single digit 0 or 1. Outp ...
- April Fools Contest 2017 C
Description DO YOU EXPECT ME TO FIND THIS OUT? WHAT BASE AND/XOR LANGUAGE INCLUDES string? DON'T BYT ...
- April Fools Contest 2017 B
Description Programmers' kids solve this riddle in 5-10 minutes. How fast can you do it? Input The i ...
- April Fools Contest 2017 A
Description Input The input contains a single integer a (1 ≤ a ≤ 30). Output Output a single integer ...
- April Fools Contest 2018
这个比赛不正经,但是我可以一本正经的写代码啊 A. Quirky Quantifiers time limit per test 2 seconds memory limit per test 64 ...
随机推荐
- uboot 对 FAT 分区的解析
uboot 对 FAT 分区的解析 改写 UBOOT 从 U 盘读入固件,然后刷机.发现有的 U 盘无法正确读到分区,跟踪了一下发现自己写的代码有漏洞,只尝试解析分区表里的第一个分区.跟踪的过程中重温 ...
- 信雅达面试题atoi函数实现
atoi函数: 功 能: 把字符串转换成整型数. 名字来源:ASCII to integer 的缩写. 原型: int atoi(const char *nptr); 函数说明 参数nptr字符串,如 ...
- Please verify that your device’s clock is properly set, and that your signing certificate is not exp
真机调试的时候出现此类警告,之前也遇到过,但是一直没总结,今天总结一下 出现这样的问题大概有几个解决方法: 1.最简单的一种----假设你的证书是近期才申请的没什么问题.或者说前几天測试还没问题,突然 ...
- Spark 学习笔记:(二)编程指引(Scala版)
参考: http://spark.apache.org/docs/latest/programming-guide.html 后面懒得翻译了,英文记的,以后复习时再翻. 摘要:每个Spark appl ...
- 杭电 1596 find the safest road (最短路)
http://acm.hdu.edu.cn/showproblem.php?pid=1596 这道题目与杭电2544最短路的思想是一样的.仅仅只是是把+改成了*,输入输出有些不一样而已. find t ...
- curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused
今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...
- 基于mqtt协议实现手机位置跟踪
Mqtt协议是物联网领域的一个标准协议,具有轻巧,对设备,带宽要求低,可靠稳定的特点,适合用来实现手机定位跟踪功能. 目前我初步搭建起来了整个可运行的框架,大致为如下思路:1.手机端通过位置服务,获取 ...
- RubyMine安装、破解
经常安装东西,这是我安装过最快的ide破解版. 下载地址: http://www.jetbrains.com/ruby/download/index.html 破解序列号: name: rubymin ...
- lc.exe 已退出 代码为 -1
地址:http://jingyan.baidu.com/article/91f5db1bd0ace31c7f05e321.html
- Java面试手写代码题
1.栈实现 2.Iterator实现 3.单例 4.多线和控制(暂停,恢复,停止) 5.生产者消费者