結果
問題 |
No.1736 Princess vs. Dragoness
|
ユーザー |
![]() |
提出日時 | 2021-11-12 21:42:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 99 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 76,672 KB |
最終ジャッジ日時 | 2024-11-25 17:39:41 |
合計ジャッジ時間 | 3,364 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
n,a,b,x,y = map(int,input().split()) h = list(map(lambda x:-int(x),input().split())) b_sum = b*y h.sort(reverse=True) import heapq q = h[::] heapq.heapify(q) # print(q) for i in range(a): aa = heapq.heappop(q) aa = min(aa+x,0) heapq.heappush(q,aa) h = list(map(lambda x:-int(x),q)) # print(h) for i in range(n): d = min(b_sum,h[i]) h[i] -= d b_sum -= d if sum(h) == 0: print("Yes") else: print("No")