답안 #22090

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
22090 2017-04-29T07:52:26 Z 쀼쀼~(#1017, cki86201) 시간과 날짜 (KRIII5P_1) C++11
7 / 7
3 ms 2020 KB
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <assert.h>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <algorithm>
#include <iostream>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <bitset>

using namespace std;
typedef pair<int, int> Pi;
typedef long long ll;
#define pii Pi
#define pll PL
#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) ((int)(x).size())
#define rep(i, n) for(int i=0;i<n;i++)
#define all(x) (x).begin(), (x).end()
typedef tuple<int, int, int> t3;
typedef pair<ll, ll> PL;
typedef long double ldouble;

void solve(){
	int A[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	int x, y; scanf("%d%d", &x, &y);
	if(x <= 23 && y <= 59)printf("Yes ");
	else printf("No ");
	if(1 <= x && x <= 12 && 1 <= y && y <= A[x])printf("Yes\n");
	else printf("No\n");
}

int main(){
	int Tc = 1; scanf("%d\n", &Tc);
	for(int tc=1;tc<=Tc;tc++){
		solve();
	}
	return 0;
}

Compilation message

td.cpp: In function 'void solve()':
td.cpp:36:33: 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);
                                 ^
td.cpp: In function 'int main()':
td.cpp:44:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int Tc = 1; scanf("%d\n", &Tc);
                                ^
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 2020 KB Output is correct