結果
| 問題 | No.779 Heisei | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-05-05 23:11:42 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 446 bytes | 
| コンパイル時間 | 1,494 ms | 
| コンパイル使用メモリ | 166,164 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-11-06 05:47:48 | 
| 合計ジャッジ時間 | 2,335 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
bool isHeisei(int Y, int M, int D){
    if (Y < 1989 or Y > 2019) return false;
    if (Y == 1989){
        return (M > 1 or D >= 8);
    }else if (Y == 2019){
        return (M <= 4);
    }else{
        return true;
    }
}
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int Y, M, D;
    cin >> Y >> M >> D;
    cout << (isHeisei(Y, M, D) ? "Yes" : "No") << endl;
    return 0;
}
            
            
            
        