結果

問題 No.138 化石のバージョン
ユーザー shi-moshi-mo
提出日時 2016-04-04 10:57:08
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 409 bytes
コンパイル時間 790 ms
コンパイル使用メモリ 102,516 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 03:22:00
合計ジャッジ時間 1,788 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 33
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio;
import std.string;
import std.algorithm;
import std.array;
import std.conv;
import core.stdc.stdlib;

void main() {
    int[] a = readln.strip.split(".").map!(to!int).array;
    int[] b = readln.strip.split(".").map!(to!int).array;

    foreach (i, ai; a) {
        if (b[i] < ai) break;
        if (b[i] == ai) continue;

        writeln("NO");
        exit(0);
    }
    writeln("YES");
}
0