結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-28 22:53:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 458 bytes |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 68,972 KB |
| 最終ジャッジ日時 | 2024-11-25 11:03:18 |
| 合計ジャッジ時間 | 3,422 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | AC * 1 RE * 32 |
ソースコード
from collections import deque
n, a, b, x, y = map(int,input().split())
h = list(map(int,input().split()))
h.sort()
q1 = deque(h)
q2 = deque()
for i in range(a):
now = 0
if not q1:
now = q2.pop()
if not q2:
now = q1.pop()
if q1[-1] > q2[-1]:
now = q1.pop()
else:
now = q2.pop()
now = max(now - a, 0)
q2.appendleft(now)
if sum(q1) + sum(q2) <= b * y:
print('Yes')
else:
print('No')