結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-10-14 22:41:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| コード長 | 388 bytes |
| コンパイル時間 | 411 ms |
| コンパイル使用メモリ | 82,316 KB |
| 実行使用メモリ | 77,036 KB |
| 最終ジャッジ日時 | 2025-07-04 14:01:43 |
| 合計ジャッジ時間 | 3,840 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
import heapq
n,a,b,x,y=map(int,input().split())
h=list(map(int,input().split()))
if 1<=n<=3000 and 0<=a<=3000 and 0<=b<=3000 and 1<=x<=10**9 and 1<=y<=10**9 and min(h)>=1 and max(h)<=10**9:
pass
else:
raise Exception
hq=[]
for i in h:
heapq.heappush(hq,-i)
for i in range(a):
t=heapq.heappop(hq)
heapq.heappush(hq,min(0,t+x))
if -sum(hq)<=b*y:
print('Yes')
else:
print('No')
とりゐ