結果
| 問題 | No.1736 Princess vs. Dragoness |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 22:18:56 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 58 ms / 2,000 ms |
| + 464µs | |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 402 ms |
| コンパイル使用メモリ | 64,628 KB |
| 実行使用メモリ | 59,660 KB |
| 最終ジャッジ日時 | 2026-10-15 03:25:33 |
| 合計ジャッジ時間 | 3,854 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
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')