1 条题解
-
0
undefined_kkksc03 LV 6 @ 2025-08-13 18:11:22
#include <bits/stdc++.h>
using namespace std;
bool ha[120][120];//i表示月,j表示day
int main()
{
int n;
scanf("%d", &n);
for (int i = 1; i <= 100; i++)
for (int j = 1; j <= 100; j++)
{
if ((i + j ) % 2 == 0 || (i == 9 && j == 30) || (i == 11 && j == 30))
ha[i][j] = 1;
}
while (n--)
{
int a, b, c;
cin >> a >> b >> c;
if (ha[b][c])
printf("YES\n");
else
printf("NO\n");
}
return 0;
}
- 1