Nathan Coulas

CCC '07 S1 - Federal Voting Age

ccc07s1 CPP11 31 Jul, 2020 0.008s 3 points

Source Code

#include <bits/stdc++.h>
using namespace std;

typedef long long LL; 
typedef pair<int, int> pii; 
typedef pair<LL, LL> pll; 
typedef pair<string, string> pss; 
typedef vector<int> vi; 
typedef vector<vi> vvi; 
typedef vector<pii> vii; 
typedef vector<LL> vl; 
typedef vector<vl> vvl;
typedef queue<int> qi;
typedef queue<char> qc;
typedef stack<int> si;
typedef stack<char> sc;

int main(){
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int n;
	cin >> n;
	
	for(int i = 0; i < n; i++){
		int y, m, d;
		cin >> y >> m >> d;
		cout << ((y < 1989 || (y == 1989 && (m < 2 || (m == 2 && d <= 27)))) ? "Yes\n" : "No\n");
	}

	return 0;
}