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