結果

問題 No.2922 Rose Garden
ユーザー tnodinotnodino
提出日時 2024-09-15 12:53:57
言語 Rust
(1.77.0 + proconio)
結果
AC  
実行時間 14 ms / 3,000 ms
コード長 624 bytes
コンパイル時間 12,328 ms
コンパイル使用メモリ 401,976 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-05 18:10:08
合計ジャッジ時間 15,416 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,816 KB
testcase_01 AC 5 ms
6,816 KB
testcase_02 AC 7 ms
6,820 KB
testcase_03 AC 13 ms
6,820 KB
testcase_04 AC 8 ms
6,816 KB
testcase_05 AC 7 ms
6,816 KB
testcase_06 AC 5 ms
6,820 KB
testcase_07 AC 11 ms
6,820 KB
testcase_08 AC 3 ms
6,820 KB
testcase_09 AC 11 ms
6,816 KB
testcase_10 AC 4 ms
6,816 KB
testcase_11 AC 3 ms
6,820 KB
testcase_12 AC 8 ms
6,820 KB
testcase_13 AC 10 ms
6,816 KB
testcase_14 AC 3 ms
6,820 KB
testcase_15 AC 7 ms
6,816 KB
testcase_16 AC 9 ms
6,816 KB
testcase_17 AC 13 ms
6,816 KB
testcase_18 AC 1 ms
6,816 KB
testcase_19 AC 6 ms
6,820 KB
testcase_20 AC 9 ms
6,816 KB
testcase_21 AC 12 ms
6,820 KB
testcase_22 AC 7 ms
6,820 KB
testcase_23 AC 12 ms
6,820 KB
testcase_24 AC 2 ms
6,820 KB
testcase_25 AC 6 ms
6,816 KB
testcase_26 AC 9 ms
6,816 KB
testcase_27 AC 10 ms
6,816 KB
testcase_28 AC 9 ms
6,820 KB
testcase_29 AC 8 ms
6,816 KB
testcase_30 AC 1 ms
6,820 KB
testcase_31 AC 1 ms
6,820 KB
testcase_32 AC 1 ms
6,816 KB
testcase_33 AC 1 ms
6,816 KB
testcase_34 AC 1 ms
6,820 KB
testcase_35 AC 1 ms
6,816 KB
testcase_36 AC 2 ms
6,816 KB
testcase_37 AC 2 ms
6,820 KB
testcase_38 AC 1 ms
6,816 KB
testcase_39 AC 2 ms
6,820 KB
testcase_40 AC 8 ms
6,816 KB
testcase_41 AC 5 ms
6,816 KB
testcase_42 AC 14 ms
6,816 KB
testcase_43 AC 6 ms
6,820 KB
testcase_44 AC 13 ms
6,816 KB
testcase_45 AC 3 ms
6,816 KB
testcase_46 AC 14 ms
6,816 KB
testcase_47 AC 9 ms
6,820 KB
testcase_48 AC 3 ms
6,820 KB
testcase_49 AC 13 ms
6,820 KB
testcase_50 AC 1 ms
6,820 KB
testcase_51 AC 1 ms
6,820 KB
testcase_52 AC 1 ms
6,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;
use proconio::fastout;

#[fastout]
#[allow(non_snake_case)]
fn main() {
    input! {
        (N, S, B): (usize, usize, usize),
        H: [usize; N],
    }
    assert!(1 <= N && N <= 200_000);
    assert!(1 <= S && S <= 1_000_000_000);
    assert!(1 <= B && B <= 1_000_000_000);
    assert!(H.iter().all(|&x| x <= 1_000_000_000));
    let mut rev = H[0];
    for i in 1..N {
        if rev >= H[i] {
            continue;
        }
        let sub = H[i] - rev;
        if (sub + B - 1) / B > S {
            println!("No");
            return;
        }
        rev = H[i];
    }
    println!("Yes");
}
0