結果

問題 No.779 Heisei
ユーザー stone_725stone_725
提出日時 2019-01-11 21:24:28
言語 C++17(clang Beta)
(clang 13.0.0 + boost 1.78.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 967 bytes
コンパイル時間 2,297 ms
使用メモリ 3,444 KB
最終ジャッジ日時 2023-01-06 18:01:46
合計ジャッジ時間 3,207 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
3,388 KB
testcase_01 AC 1 ms
3,376 KB
testcase_02 AC 1 ms
3,384 KB
testcase_03 AC 1 ms
3,372 KB
testcase_04 AC 1 ms
3,436 KB
testcase_05 AC 1 ms
3,324 KB
testcase_06 AC 1 ms
3,392 KB
testcase_07 AC 1 ms
3,392 KB
testcase_08 AC 1 ms
3,388 KB
testcase_09 AC 2 ms
3,388 KB
testcase_10 AC 2 ms
3,376 KB
testcase_11 AC 2 ms
3,360 KB
testcase_12 AC 2 ms
3,388 KB
testcase_13 AC 2 ms
3,444 KB
testcase_14 AC 1 ms
3,372 KB
testcase_15 AC 2 ms
3,368 KB
testcase_16 AC 2 ms
3,388 KB
testcase_17 AC 2 ms
3,332 KB
testcase_18 AC 1 ms
3,420 KB
testcase_19 AC 2 ms
3,372 KB
testcase_20 AC 1 ms
3,388 KB
testcase_21 AC 1 ms
3,436 KB
testcase_22 AC 1 ms
3,400 KB
権限があれば一括ダウンロードができます

ソースコード

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