結果

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

ソースコード

diff #

n,S,B=map(int,input().split())
h=list(map(int,input().split()))
q=[]
for v in h:
  while len(q)>0 and q[-1]<v:
    q.pop()
  q+=[v]
p=h[0]+S*B
for i in range(n-1):
  if p<h[i+1]:
    print("No")
    exit()
  p=h[i+1]+S*B
print("Yes")
0