結果
| 問題 | 
                            No.1736 Princess vs. Dragoness
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-11-12 22:43:49 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 274 bytes | 
| コンパイル時間 | 164 ms | 
| コンパイル使用メモリ | 82,456 KB | 
| 実行使用メモリ | 62,148 KB | 
| 最終ジャッジ日時 | 2024-11-25 20:25:18 | 
| 合計ジャッジ時間 | 2,559 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 23 WA * 10 | 
ソースコード
N,A,B,X,Y = map(int,input().split())
H = list(map(int,input().split()))
H.sort(reverse=True)
p = Y*B
for i in range(N):
    if A>0:
        H[i]-=X
        A-=1
    if H[i]>0 and p>0:
        d = min(p,H[i])
        H[i]-=d
        p-=d
print('Yes'if sum(H)<=0 else 'No')