結果

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

ソースコード

diff #

from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations
from functools import cmp_to_key, cache
from heapq import heappop, heappush
import math, sys
import pypyjit
pypyjit.set_param('max_unroll_recursion=-1')
sys.setrecursionlimit(10**7)
_int = lambda x: int(x)-1
MOD = 998244353
INF = 1<<62
Yes, No = "Yes", "No"

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

cur = 0
h = H[0]+S*B
mx = 0
for i in range(N):
    if h < H[i]:
        h = mx+S*B
        if h < H[i]:
            print(No)
            exit()
        mx = 0
    else:
        mx = max(mx, H[i])
print(Yes)
0