結果
問題 | No.2922 Rose Garden |
ユーザー |
|
提出日時 | 2024-10-12 14:49:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 203 ms / 3,000 ms |
コード長 | 523 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 82,036 KB |
実行使用メモリ | 122,888 KB |
最終ジャッジ日時 | 2024-10-12 14:49:30 |
合計ジャッジ時間 | 10,336 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #sys.set_int_max_str_digits(0) #input = sys.stdin.readline #n = int(input()) #alist = list(map(int,input().split())) #alist = [] n,s,b = map(int,input().split()) h = list(map(int,input().split())) dp = [0 for j in range(n)] now = h[0] + s*b dp[0]=1 for i in range(1,n): if now >= h[i]: now = max(now,h[i]+s*b) dp[i] = 1 else: break print('Yes' if dp[-1] else 'No')