Submission #22135

# Submission time Handle Problem Language Result Execution time Memory
22135 2017-04-29T11:13:16 Z 연습대회 팀 네임은 수정할 수 있을까?(#1024, qja0950) None (KRIII5P_1) C++14
7 / 7
0 ms 1116 KB
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <functional>
#include <set>
#include <map>
#include <queue>
#include <tuple>
#include <string.h>

using namespace std;

#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
typedef long long ll;

int day[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int main() {
	int TC; scanf("%d", &TC);
	while(TC--) {
		int x, y; scanf("%d%d", &x, &y);
		if(x >= 0 && x <= 23 && y >= 0 && y <= 59) printf("Yes "); else printf("No ");
		if(x >= 1 && x <= 12 && day[x] >= y && y >= 1) printf("Yes\n"); else printf("No\n");
	}
	return 0;
}

Compilation message

td.cpp: In function 'int main()':
td.cpp:18:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int TC; scanf("%d", &TC);
                          ^
td.cpp:20:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int x, y; scanf("%d%d", &x, &y);
                                  ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct