結果
問題 | No.2922 Rose Garden |
ユーザー |
![]() |
提出日時 | 2024-10-12 15:27:05 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 90 ms / 3,000 ms |
コード長 | 408 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 82,212 KB |
実行使用メモリ | 107,836 KB |
最終ジャッジ日時 | 2024-10-12 15:27:12 |
合計ジャッジ時間 | 5,151 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
N, S, B = map(int, input().split())H = list(map(int, input().split()))now = 0Y = H[0]while now < N-1:Y += S * Bmx, mx_i = -1, -1x = nowwhile x+1 < N and H[x+1] <= Y:if H[x+1] > mx:mx = H[x+1]mx_i = x+1x += 1if mx == -1:print("No")exit()if x == N-1:print("Yes")exit()Y = mxnow = mx_i