AC Milan VS Juventus

Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others)
Submit Status

Kennethsnow and Hlwt both love football.

One day, Kennethsnow wants to review the match in 20032003 between AC Milan and Juventus for the Championship Cup. But before the penalty shootout. he fell asleep.

The next day, he asked Hlwt for the result. Hlwt said that it scored aa:bb in the penalty shootout.

Kennethsnow had some doubt about what Hlwt said because Hlwt is a fan of Juventus but Kennethsnow loves AC Milan.

So he wanted to know whether the result can be a legal result of a penalty shootout. If it can be, output Yes, otherwise output No.

The rule of penalty shootout is as follows:

  • There will be 55 turns, in each turn, 22 teams each should take a penalty shoot. If goal, the team get 11 point. After each shoot, if the winner can be confirmed(i.e: no matter what happened after this shoot, the winner will not change), the match end immediately.

  • If after 55 turns the 22 teams score the same point. A new turn will be added, until that one team get a point and the other not in a turn.

Before the penalty shootout begins, the chief referee will decide which team will take the shoot first, and afterwards, two teams will take shoot one after the other. Since Kennethsnow fell asleep last night, he had no idea whether AC Milan or Juventus took the first shoot.

Input

The only line contains 22 integers aa, bb. Means the result that Hlwt said.

0≤a,b≤100≤a,b≤10

Output

Output a string Yes or No, means whether the result is legal.

Sample input and output

Sample Input Sample Output
3 2
Yes
2 5
No

Hint

The Sample 11 is the actual result of the match in 20032003.

The Sample 22, when it is 22:44 after 44 turns, AC Milan can score at most 11 point in the next turn. So Juventus has win when it is 22:44. So the result cannot be 22:55.

This story happened in a parallel universe. In this world where we live, kennethsnow is a fan of Real Madrid.

题解:两个队投球,进了得1分,当一个队必胜的时候可以不用打了;现在给出得分判断是否合理;

代码:

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
bool work(int a, int b){
if(a == b)
return false;
if(a > || b > ){
if(abs(a - b) == )
return true;
else
return false;
}
if(a == || b == ){
if(b < || a < )
return false;
else
return true;
}
if(a == || b == ){
if(a == || b == )
return false;
else
return true;
}
if(a == || b == ){
return true;
}
return true;
}
int main(){
int a, b;
while(~scanf("%d%d", &a, &b)){
if(work(a, b))
puts("Yes");
else
puts("No");
}
return ;
}

AC Milan VS Juventus(模拟)的更多相关文章

  1. UESTC 1034 AC Milan VS Juventus 分情况讨论

    AC Milan VS Juventus Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Oth ...

  2. cdoj第13th校赛初赛A - AC Milan VS Juventus 【枚举】

    http://acm.uestc.edu.cn/#/contest/show/54 A - AC Milan VS Juventus Time Limit: 3000/1000MS (Java/Oth ...

  3. noi.ac NOI挑战营模拟赛1-5

    注:因为博主是个每次考试都爆零垫底的菜鸡,所以此篇博客很有可能咕咕咕 (指只贴AC代码不写题解的......如果我真的不会做的话,就不能怪我了qwqwq) Day1 T1 swap 23pts 从一个 ...

  4. [NOI.AC]NOI2019省选模拟赛 第二场

    传送门 Solution A. 一共有\(T\)组数据 每次询问你\([l,r]\)中有多少个数能被他的所有数位整除(如果数位中含有\(0\)忽略掉) 数位dp,咕咕咕 B. 题面略 考虑一个个只有两 ...

  5. noi.ac 邀请赛1 By cellur925

    A. array 考场:上来就想暴力,首先第一个子任务肯定没问题,怎么搞都行.然后第二个子任务用个数组记下新修的值就行了.第三个子任务用一下等差数列求和公式帮助求解,每次都重新算(因为每次改变全部元素 ...

  6. Daily record-September

    September11. I feel much more reassured when I've been for a health check. 体检之后我感到放心多了.2. The diseas ...

  7. noip2016题解汇总

    [uoj#260]玩具谜题 传送门 http://uoj.ac/problem/260 分析 模拟. int n,m; int dir[N]; char nam[N][L]; int a[M],s[M ...

  8. 字典树trie的学习与练习题

    博客详解: http://www.cnblogs.com/huangxincheng/archive/2012/11/25/2788268.html http://eriol.iteye.com/bl ...

  9. SCAU 07校赛 10317 Fans of Footbal Teams

    10317 Fans of Footbal Teams 时间限制:1000MS  内存限制:65535K 题型: 编程题   语言: 无限制 Description Two famous footba ...

随机推荐

  1. Android自定义控件(三)——有弹性的ListView

    上一次我们试验了有弹性的ScrollView.详情 这一次,我们来试验有弹性的ScrollView. 国际惯例,效果图: 主要代码: import android.content.Context; i ...

  2. Tomcat 原理篇

    TOMCAT 原理篇一.Tomcat 组成(Tomcat 由以下组件组成) 1.server a) Server是一个Catalina Servlet容器: b) Server 可以包含一个或多个se ...

  3. with admin option 与with grant option

    在赋予user 权限或者role 时,常常会用到with admin option 和with grant option,而在使用中,可能会很容易出现混淆的情况,现把他们的相同点和不同点总结如下:相同 ...

  4. oracle创建表空间-用户-角色-授权

    1.创建数据表空间: SQL> create tablespace rusky_data datafile 'D:\rusky\rusky_data01,dbf' size 10M autoex ...

  5. cookie 和 session

    会话(Session)跟踪是Web程序中常用的技术,用来跟踪用户的整个会话.常用的会话跟踪技术是Cookie与Session.Cookie通过在客户端记录信息确定用户身份,Session通过在服务器端 ...

  6. 将16进制(HTML)颜色值转换成 Color类型

    private void btnChangeColor_Click(object sender, EventArgs e) { txtColor.BackColor = ColorTranslator ...

  7. (转) [老老实实学WCF] 第三篇 在IIS中寄存服务

    第三篇 在IIS中寄宿服务 通过前两篇的学习,我们了解了如何搭建一个最简单的WCF通信模型,包括定义和实现服务协定.配置服务.寄宿服务.通过添加服务引用的方式配置客户端并访问服务.我们对WCF的编程生 ...

  8. Shiro 权限框架使用总结

    我们首先了解下什么是shiro ,Shiro 是 JAVA 世界中新近出现的权限框架,较之 JAAS 和 Spring Security,Shiro 在保持强大功能的同时,还在简单性和灵活性方面拥有巨 ...

  9. 3、HelloKhala示例说明

    最简单的dome程序只需3行代码 int main() { //设置端口号 InetAddress listenAddr(USER_PORT); //将端口号绑定到Server NodeServer ...

  10. React java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/com.edaixi.activity/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

    E/AndroidRuntime: FATAL EXCEPTION: main Process: com.edaixi.activity, PID: 3659 at java.lang.Runtime ...