結果
| 問題 | No.1736 Princess vs. Dragoness |
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-10-14 22:41:01 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 58 ms / 2,000 ms |
| + 959µs | |
| コード長 | 388 bytes |
| 記録 | |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 64,840 KB |
| 実行使用メモリ | 59,732 KB |
| 最終ジャッジ日時 | 2026-10-15 03:11:48 |
| 合計ジャッジ時間 | 4,074 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
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')
とりゐ