結果
| 問題 | No.1736 Princess vs. Dragoness |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2025-01-14 21:07:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 470 bytes |
| 記録 | |
| コンパイル時間 | 308 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 65,280 KB |
| 最終ジャッジ日時 | 2026-06-14 00:45:41 |
| 合計ジャッジ時間 | 3,599 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 34 |
ソースコード
from sortedcontainers import SortedList
N,A,B,X,Y = map(int,input().split())
H = list(map(int,input().split()))
S = SortedList(H)
while S and S[-1] >= X and A > 0:
tmp = S[-1]
S.pop(-1)
if tmp > X:
S.add(tmp - X)
A -= 1
while S and B > 0:
y = Y
B -= 1
while S and y >= S[0]:
y -= S[0]
S.pop(0)
if S:
tmp = S[0]
S.pop(0)
S.add(tmp - y)
if len(S) <= A:
print("Yes")
else:
print("No")
ntuda