結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 21:39:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 328 bytes |
| コンパイル時間 | 143 ms |
| コンパイル使用メモリ | 82,448 KB |
| 実行使用メモリ | 77,640 KB |
| 最終ジャッジ日時 | 2024-11-25 17:31:36 |
| 合計ジャッジ時間 | 3,157 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 RE * 3 |
ソースコード
from heapq import heappop,heappush
n,a,b,x,y = map(int,input().split())
H = list(map(int,input().split()))
h = []
for i in H:
heappush(h,-i)
for i in range(a):
num = -heappop(h)
num -= x
if num <= 0:
continue
heappush(h,-num)
count = -sum(h)
if count <= b*y:
print("Yes")
else:
print("No")