結果

問題 No.2922 Rose Garden
ユーザー ちーぴん
提出日時 2024-10-13 20:09:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 3,000 ms
コード長 301 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 81,920 KB
実行使用メモリ 108,928 KB
最終ジャッジ日時 2024-10-13 20:09:26
合計ジャッジ時間 6,051 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

N, S, B = map(int, input().split())
H = list(map(int, input().split()))

if N == 1:
    print('Yes')
    exit()
highest = H[0]
possible = H[0] + S*B
for h in H[1:]:
    if h > possible:
        print('No')
        exit()
    if h > highest:
        highest = h
        possible = h + S*B
print('Yes')
0