Nefu1173dipper landlord "Mess"

Source: Internet
Author: User

The "Dipper Landlord" is a card game played by three people. In each game, there was a player is the landlord, and the other 2 was farmers, each game score was x=6x2y (Y is a non negative I Nteger). If the landlord wins the game, he'll 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 the wonder that he might is 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 points.
Input
There is several test cases end with EOF. For each test case, there is 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 10001036 982 9821015 994 9911024 1024 950
Sample Output
Yesyesnono

Last night of the game, the teacher began to say the first 1 hours can out 4, we first 40 minutes out of 5, and then so a question has been stuck to the end, from the first to the countdown, all tears = =

Test instructions: Dou Landlords each time, the landlord won the score is twice times the civilian, the starting point 1000, asked whether three number is reasonable, there is no need to determine whether the difference can be divisible by 6! Except for the sum of 3000, there is only one condition: the difference of every two numbers must be a multiple of 18! Good mulberry heart = =

#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;}


Nefu1173dipper landlord "Mess"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.