Vijos1004 Game Theory

Source: Internet
Author: User

A simple game topic

I feel that I have not learned the game theory in a very standard way, that is, I occasionally click on the question of the game theory and feel what the process of derivation may understand.

 

If we set 2001.11.4 to fail, we will push it up, that is, 2001.10.4 and 2001.11.3 will win (at this time, M + D = even) and then push it up to 11.2, 10.3, 9.3, both are defeated (m + D = odd at this time), and so on ......
Why is the exception 9.30 and 11.30?
Because 9.30 and 11.30 months + 1, that is, 10.30 and 12.30, both are defeated.
This situation only appeared in August and later. Why should we be clear?
2.29 is an odd number.
There is no 2.29, and there are no problems connecting 2.28 and 3.1.
12.31: 1.1)
So this question has nothing to do with the Year.

The Code is as follows:

 

#include<cstdio>#include<cstring>#include<algorithm>#include<iostream>#include<cmath>using namespace std;int n,x,y,z;int main(){//freopen("data.txt","r",stdin);scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d%d%d",&x,&y,&z);        if(y==9 && z==30) printf("YES\n");        else if(y==11 && z==30) printf("YES\n");        else if((y+z)%2==0) printf("YES\n");        else printf("NO\n");}return 0;}

 

In fact, the question code of game theory is very short... as long as you can see the rule in it, simply simulate it.

 

Vijos1004 Game Theory

Related Article

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.