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. spring单元测试的基本配置

    @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:trade.ap ...

  2. poj1976

    dp #include <cstdio> #include <cstring> #include <algorithm> using namespace std; ...

  3. ASP.NET MVC5 支持PUT 和DELETE

    Web.config <configuration> <system.webServer> <handlers> <remove name="Ext ...

  4. ThinkPHP小知识点

    ThinkPHP模版中时间戳转换为时间 {$vo.data|date='Y-m-d',###} thinkphp字符截取函数msubstr() ThinkPHP有一个内置字符截取函数mb_substr ...

  5. java批量生成excel文件

    1.导入用于操作excel的jar,地址:https://pan.baidu.com/s/1qXADRlU 2.生成excel使用的模版文件,地址:https://pan.baidu.com/s/1c ...

  6. JS格式化时间并比较

    JS格式化时间,然后进行比较.工作遇到的情况,然后网上找到的,记下来,下次用! </head> <body> <button onclick="myFuncti ...

  7. hdu 4559 涂色游戏(SG)

    在一个2*N的格子上,Alice和Bob又开始了新游戏之旅. 这些格子中的一些已经被涂过色,Alice和Bob轮流在这些格子里进行涂色操作,使用两种涂色工具,第一种可以涂色任意一个格子,第二种可以涂色 ...

  8. java内存溢出分析工具

    http://www.cnblogs.com/preftest/archive/2011/12/08/2281322.html java内存溢出分析工具:jmap使用实战 在一次解决系统tomcat老 ...

  9. hadoop集群的搭建(分布式安装)

    集群 计算机集群是一种计算机系统,他通过一组松散集成的计算机软件和硬件连接起来高度紧密地协同完成计算工作. 集群系统中的单个计算机通常称为节点,通常通过局域网连接. 集群技术的特点: 1.通过多台计算 ...

  10. CentOS 使用命令设置代理

    全局的代理设置, vim /etc/profile 添加下面内容 http_proxy = http://username:password@yourproxy:8080/ ftp_proxy = h ...