結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
puzneko
|
| 提出日時 | 2021-11-24 23:29:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 401 bytes |
| コンパイル時間 | 1,054 ms |
| コンパイル使用メモリ | 11,904 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-07-04 14:06:16 |
| 合計ジャッジ時間 | 2,406 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
from sys import stdin
from heapq import heappush, heappop
n, a, b, x, y, *h = map(int, stdin.read().split())
hq = []
for i in range(n):
heappush(hq, -h[i])
for i in range(a):
if hq:
now = -heappop(hq)
if now > x:
kari = now - x
heappush(hq, -kari)
kari = 0
while hq:
kari += -heappop(hq)
if kari <= b * y:
print("Yes")
else:
print("No")
puzneko