結果

問題 No.138 化石のバージョン
ユーザー hiyori
提出日時 2017-08-07 08:55:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 496 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 62,080 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 14:28:43
合計ジャッジ時間 1,908 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
using namespace std;

int main()
{
    int a,b,c,l,m,n;
    scanf("%d.%d.%d", &a, &b, &c);
    scanf("%d.%d.%d", &l, &m, &n);
    int flag=0;
    if(a>l) { flag=1; }
    else if(a==l) {
        if(b>m) { flag=1; }
        else if(b==m) {
            if(c>=n) { flag=1; }
            else{} //c<n
        }
        else{} //b<m
    }
    else{} //a<l
    
    if(flag==0) { cout << "NO" << endl; }
    else if(flag==1) { cout << "YES" << endl;}
    return 0;
}
0