nefu1173Dipper Landlord【乱搞】

 
The “Dipper Landlord” is a card game played by three people. In each game, there is a player is the landlord, the other 2 are farmers, each game score is x=6×2y (y is a non negative integer). If the Landlord wins the game, he will win the 2x points, both of 2 farmers lose x points. On the contrary, the farmers win, each farmer wins x points, the landlord lose 2x points.
Xiao Ming is the game scorer; he recorded the score of each player. But you wonder that he might be wrong, so you randomly choose a record to see if it's a valid score.
At the beginning of the game, each player is given 1000 points.

Input

There are several test cases end with EOF. For each test case, there are three integers in one line: r1,r2,r3, the score of three players.(-10,000≤r1,r2,r3≤10,000).

Output

For each case, output Yes if it's a valid score, No otherwise.

Sample Input

1000 1000 1000
1036 982 982
1015 994 991
1024 1024 950

Sample Output

Yes
Yes
No
No

昨天晚上比赛的题,老师最开始说前1个小时能出4个,我们前40分钟出了5个,然后这么一道题一直卡到最后,从第一名掉到倒数,全是泪==

题意:斗地主每次,地主赢的分数是平民的二倍,起始分数1000,问三个数是否合理,根本就不用判断那个差是否能被6整除!除了总和得3000以外就只有一个条件:每两个数的差必须是18的倍数!好桑心==

#include <iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<map>
using namespace std;
int x1,x2,x3;
int num[3];
int main()
{
    while(~scanf("%d%d%d",&x1,&x2,&x3))
    {
        if(x1+x2+x3!=3000)
        puts("No");
        else
        {
            if((x1-x2)%18!=0||(x2-x3)%18!=0||(x1-x3)%18!=0)
            puts("No");
            else puts("Yes");
        }
    }
    return 0;
}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值