結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-06-11 01:17:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| コード長 | 412 bytes |
| コンパイル時間 | 167 ms |
| コンパイル使用メモリ | 82,580 KB |
| 実行使用メモリ | 76,768 KB |
| 最終ジャッジ日時 | 2025-07-04 14:07:44 |
| 合計ジャッジ時間 | 3,231 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
from heapq import heappush, heappop, heapify
def solve():
q = [-h for h in H]
heapify(q)
for _ in range(A):
if len(q) == 0: break
x = -heappop(q)
if x > X:
heappush(q, -(x-X))
tot = sum(-x for x in q)
return tot <= Y * B
N, A, B, X, Y = map(int, input().split())
H = list(map(int, input().split()))
if solve():
print('Yes')
else:
print('No')
norioc