結果

問題 No.779 Heisei
ユーザー stone_725
提出日時 2019-01-11 21:24:28
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 967 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 162,120 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 13:18:04
合計ジャッジ時間 3,057 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

static const int INF = 1e9 + 7;

template<typename T>
using Vec = vector<T>;

template<typename T, typename T2>
using P = pair<T, T2>;

template<typename... Args>
using Tup = tuple<Args...>;

template<typename T>
using qp = priority_queue<T, Vec<T>, greater<T> >;

template<typename T>
using pq = priority_queue<T>;

using llong = long long;
using ullong = unsigned long long;
using uint = unsigned int;

template<typename T>
T gcd(T x, T y)
{
	return y ? gcd(y, x % y) : x;
}

void hawawa()
{
	int y, m, d;
	cin >> y >> m >> d;
	if (y < 1989 || 2019 < y) {
		cout << "No\n";
	}
	else if (y == 1989) {
		if (1 < m) {
			cout << "Yes\n";
		}
		else if (7 < d) {
			cout << "Yes\n";
		}
		else {
			cout << "No\n";
		}
	}
	else if (y == 2019) {
		if (m < 5) {
			cout << "Yes\n";
		}
		else {
			cout << "No\n";
		}
	}
	else {
		cout << "Yes\n";
	}
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	hawawa();
}
0