Submission #22078

#TimeUsernameProblemLanguageResultExecution timeMemory
22078sgc109 (#42)시간과 날짜 (KRIII5P_1)C++98
2 / 7
3 ms2020 KiB
#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=a;i<=b;++i)
#define FOR(i,n) for(int i=0;i<n;++i)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define sz(v) ((int)(v).size())
#define inp1(a) scanf("%d",&a)
#define inp2(a,b) scanf("%d%d",&a,&b)
#define inp3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define inp4(a,b,c,d) scanf("%d%d%d%d",&a,&b,&c,&d)
#define inp5(a,b,c,d,e) scanf("%d%d%d%d%d",&a,&b,&c,&d,&e)
#define fastio() ios_base::sync_with_stdio(false),cin.tie(NULL)
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<int> vi;	
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<vector<int> > vvi;
typedef pair<int,pair<int,int> > piii;
typedef vector<piii> viii;
const double EPSILON = 1e-9;
const double PI = acos(-1);
const int MOD = 1e9+7;
const int INF = 0x3c3c3c3c;
const long long INFL = 0x3c3c3c3c3c3c3c3c;
const int MAX_N = 102;

int T;
int days[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
int main() {
	inp1(T);
	while(T--){
		int a,b;
		inp2(a,b);
		if(0 <= a && a <= 23 && 0 <= b && b <= 59) printf("Yes ");
		else printf("No ");
		if(1 <= a && a <= 12 && 1 <= b && b <= days[a]) printf("Yes");
		else printf("No");
		printf("\n");
	}
	return 0;
}

Compilation message (stderr)

td.cpp: In function 'int main()':
td.cpp:34:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  inp1(T);
         ^
td.cpp:37:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   inp2(a,b);
            ^
td.cpp: At global scope:
td.cpp:25:14: warning: 'PI' defined but not used [-Wunused-variable]
 const double PI = acos(-1);
              ^
#Verdict Execution timeMemoryGrader output
Fetching results...