hdu1079

#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(){
int y,m,d;
int t;
scanf("%d",&t);
while(t--){
scanf("%d%d%d",&y,&m,&d);
if((m+d)%2==0||(d==30&&(m==9||m==11)))
printf("YES ");
else
printf("NO ");
}
return 0;
}

原文地址:https://www.cnblogs.com/wangkun1993/p/6341644.html