結果

問題 No.2922 Rose Garden
ユーザー kmmtkm
提出日時 2024-10-12 14:53:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 106,700 KB
最終ジャッジ日時 2024-10-12 14:53:32
合計ジャッジ時間 4,738 ms
ジャッジサーバーID
(参考情報)
judge1 / judge
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys


def debug(*args):
    print(*args, file=sys.stderr)


n, s0, b = map(int, input().split())
h = list(map(int, input().split()))

s = s0
for i in range(n-1):
    if h[i] < h[i+1]:
        diff = h[i+1] - h[i]
        y = (diff+b-1) // b
        if y > s:
            print('No')
            exit()
        # s -= n
        s = s0
    else:
        pass

print('Yes')
0