結果
| 問題 | 
                            No.1736 Princess vs. Dragoness
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-12-03 20:30:53 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 480 bytes | 
| コンパイル時間 | 77 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-07-06 04:00:21 | 
| 合計ジャッジ時間 | 2,393 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 3 | 
| other | WA * 33 | 
ソースコード
N,A,B,X,Y = list(map(int,input().split()))
H = list(map(int,input().split()))
H.sort(reverse = True)
count = 0
i = 0
while count < A and i < N:
    q = H[i] // X
    if q == 0:
        count += 1
        H[i] = 0
        i += 1
    else:
        q1 = min(A - count,q)
        count += q1
        H[i] -= X * q1
        i += 1
if count < A:
    H.sort(reverse = True)
    for i in range(min(A-count,N)):
        H[i] = 0
if sum(H) <= Y * B:
    print('yes')
else:
    print('no')