# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22060 | 연습 세션과 본 대회의 등록은 왜 따로일까 (#42) | 시간과 날짜 (KRIII5P_1) | C++14 | 3 ms | 1116 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int x, y, t, i;
scanf("%d", &t);
for(i = 0; i<t; i++)
{
scanf("%d%d", &x, &y);
printf(0<=x&&x<=23 && 0<=y&&y<=59 ? "YES " : "NO ");
if(x == 1 ||x == 3 ||x == 5 ||x == 7 ||x == 8 ||x == 10 ||x == 12)
printf(1<=y&&y<=31 ? "YES " : "NO ");
else if(x == 4 ||x == 6 ||x == 9 ||x == 11)
printf(1<=y&&y<=30 ? "YES " : "NO ");
else if(x == 2)
printf(1<=y&&y<=29 ? "YES " : "NO ");
else
printf("NO");
printf("\n");
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |