# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22038 | test (#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>
int main(){
int T;
int month[] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
char ans[2][10] = { "YES", "NO" };
scanf("%d", &T);
while (T--){
int a, b;
scanf("%d%d", &a, &b);
if (a >= 0 && a <= 23 && b >= 0 && b <= 59) printf("%s ", ans[0]);
else printf("%s ", ans[1]);
if (a >= 1 && a <= 12) {
if (b >= 1 && b <= month[a - 1]) printf("%s\n", ans[0]);
else printf("%s\n", ans[1]);
}
else printf("%s\n", ans[1]);
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |