結果
問題 | No.1736 Princess vs. Dragoness |
ユーザー |
|
提出日時 | 2021-11-12 21:50:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 85 ms / 2,000 ms |
コード長 | 340 bytes |
コンパイル時間 | 334 ms |
コンパイル使用メモリ | 82,032 KB |
実行使用メモリ | 77,116 KB |
最終ジャッジ日時 | 2024-11-25 18:06:34 |
合計ジャッジ時間 | 3,694 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
from heapq import heappop,heappushN,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 *= -1if h > X:heappush(q,-(h-X))A -=1SUMS = 0for h in q:SUMS += -hif SUMS <= Y * B:print('Yes')else:print('No')