1877. Bicycle Codes

Time limit: 0.5 second
Memory limit: 64 MB
Den has two four-digit combination locks for protecting his bicycle from
thieves. Every evening he arms the bicycle antitheft alarm and fastens the
bicycle to a special stand with one of the locks. Den never uses the same
lock two evenings in a row. One night a thief tried to open the lock using
the code 0000. The alarm went off and the thief hurried away. The next
night the thief decided to try the code 0001, then 0002, and so on in ascending
order of the number.
Den never changes the codes of his locks. On the night when the thief came
for the first time the bicycle was fastened with the first lock.

Input

The first line contains the combination that opens the first lock and the
second line contains the combination that opens the second lock. Both
combinations are strings consisting of four digits from 0 to 9.

Output

Output “yes” if the thief will open the lock sooner or later and “no” otherwise.

Samples

input output
0001
0000
no
0002
0001
yes

Problem Author: Denis Mukhametianov
Problem Source: Ural Regional School Programming Contest 2011

 #include<iostream>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
#include<math.h>
#include<vector>
#include<map>
#include<deque>
#include<list>
using namespace std;
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a%==||b%==)
printf("yes\n");
else
printf("no\n");
return ;
}

URAL 1877 Bicycle Codes的更多相关文章

  1. ural 1269. Obscene Words Filter

    1269. Obscene Words Filter Time limit: 0.5 secondMemory limit: 8 MB There is a problem to check mess ...

  2. 哈希URAL 1941 - Scary Martian Word

    A - Scary Martian Word Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I ...

  3. UVA-146 ID Codes

    It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exerc ...

  4. 1877: [SDOI2009]晨跑

    1877: [SDOI2009]晨跑 Time Limit: 4 Sec  Memory Limit: 64 MBSubmit: 2007  Solved: 1085[Submit][Status][ ...

  5. Lattice Codes

    最近在做的一些关于lattice codes的工作,想记录下来. 首先,我认为lattice coding是一种联合编码调制技术,将消息序列映射到星座点.其中一个良好的性质是lattice point ...

  6. System Error Codes

    很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...

  7. Windows Locale Codes - Sortable list(具体一个语言里还可具体细分,中国是2052,法国是1036)

    Windows Locale Codes - Sortable list NOTE: Code page is an outdated method for character encoding, y ...

  8. Bar codes in NetSuite Saved Searches(transport/reprint)

    THIS IS A COPY FROM BLOG Ways of incorporating Bar Codes into your Netsuite Saved Searches.    Code ...

  9. Secret Codes

    Secret Codes   This is a list of codes that can be entered into the dialer to output the listed info ...

随机推荐

  1. Linux触摸屏驱动测试程序范例【转】

    转自:http://blog.sina.com.cn/s/blog_4b4b54da0102viyl.html 转载2015-05-09 16:28:27 标签:androiditlinux 触摸屏驱 ...

  2. cocos2d-x 日志...

    cocos2d-x  日志... http://blog.csdn.net/themagickeyjianan/article/details/39008297http://blog.csdn.net ...

  3. 【Android开发】之Fragment开发1

    一直知道Fragment很强大,但是一直都没有去学习,现在有些空闲的时间,所以就去学习了一下Fragment的简单入门.我也会把自己的学习过程写下来,如果有什么不足的地方希望大牛指正,共同进步! 一. ...

  4. idea添加jdbc包

    IDEA版本:IDEA 14 这里我使用的第三方jar包是数据库的JDBC jar包导出案例. 1.创建一个Module,名称为dataBase,在里面我们先创建一个folder用来包含所需要的jar ...

  5. 使用qshell备份七牛云存储文件

    qshell是利用七牛文档上公开的API实现的一个方便开发者测试和使用七牛API服务的命令行工具.我们可以利用它来将七牛云上存储的文件备份到本地. 它提供Mac OSX, Linux, Windows ...

  6. PlantUML——4.实例演示1

    给自己发消息 @startuml Alice -> Alice : This is a signal to self.\nIt also demonstrates \nmultiline tex ...

  7. android解决AVD中文路径无法启动问题

    在as中新建一个AVD,然而启动时却报错,总之是不能找到中文路径 然后这个虚拟设备被默认安装在了C盘我的用户李敏啊,而我用户名是中文名导致无法识别 解决办法,使用链接文件格式修改虚拟设备配置路径, 比 ...

  8. 洛谷P2017晕牛

    传送门啦 这个题没有想象中复杂. 我们先有向边建立,因为我们无法改变有向边的方向. 建立完之后跑一边拓扑排序,我们按拓扑序小的指向大的就好了. 解释: 我们知道如果一个点在另一个点顺序的后面的话,如果 ...

  9. 洛谷P1782 旅行商的背包

    传送门啦 这个题不用二进制优化的话根本不行,现学的二进制优化,调了一段时间终于A了,不容易.. 如果不懂二进制优化的话可以去看我那个博客 二进制优化多重背包入口 不想TLE,不要打memset,一定要 ...

  10. 文件下载功能django+js

    1. 功能叙述 前端web页面通过访问url+id的形式访问url lottery/draw/(?P<pk>(\d+))/download/ 后端代码通过orm查询pk相关数据 过滤出自己 ...