結果
問題 |
No.1736 Princess vs. Dragoness
|
ユーザー |
![]() |
提出日時 | 2021-11-12 21:42:22 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 81 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 251 ms |
コンパイル使用メモリ | 82,732 KB |
実行使用メモリ | 77,032 KB |
最終ジャッジ日時 | 2025-07-04 14:03:34 |
合計ジャッジ時間 | 3,298 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
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")