結果

問題 No.2922 Rose Garden
ユーザー InTheBloom
提出日時 2024-10-12 14:44:20
言語 D
(dmd 2.109.1)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 3,598 ms
コンパイル使用メモリ 173,824 KB
実行使用メモリ 13,116 KB
最終ジャッジ日時 2024-10-12 14:44:27
合計ジャッジ時間 6,346 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main () {
    int N, S, B; readln.read(N, S, B);
    auto H = readln.split.to!(int[]);

    bool ok = true;
    foreach (i; 0..N - 1) {
        if (H[i] + 1L * S * B < H[i + 1]) ok = false;
    }

    if (ok) {
        writeln("Yes");
    }
    else {
        writeln("No");
    }
}

void read (T...) (string S, ref T args) {
    import std.conv : to;
    import std.array : split;
    auto buf = S.split;
    foreach (i, ref arg; args) {
        arg = buf[i].to!(typeof(arg));
    }
}
0