結果
| 問題 | No.1736 Princess vs. Dragoness |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 21:50:40 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 88 ms / 2,000 ms |
| + 150µs | |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 96,488 KB |
| 実行使用メモリ | 84,536 KB |
| 最終ジャッジ日時 | 2026-07-13 00:47:44 |
| 合計ジャッジ時間 | 4,704 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
from heapq import heappop,heappush
N,A,B,X,Y = map(int,input().split())
H = list(map(int,input().split()))
q = []
for h in H:
heappush(q,-h)
while A and q:
h = heappop(q)
h *= -1
if h > X:
heappush(q,-(h-X))
A -=1
SUMS = 0
for h in q:
SUMS += -h
if SUMS <= Y * B:
print('Yes')
else:
print('No')