結果
| 問題 | No.1736 Princess vs. Dragoness |
| コンテスト | |
| ユーザー |
puzneko
|
| 提出日時 | 2021-11-24 23:28:32 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 340 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 20,704 KB |
| 最終ジャッジ日時 | 2026-03-14 22:40:47 |
| 合計ジャッジ時間 | 6,038 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 RE * 3 |
ソースコード
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):
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