結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-03 20:31:55 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 480 bytes |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2025-07-04 14:06:19 |
| 合計ジャッジ時間 | 2,193 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
N,A,B,X,Y = list(map(int,input().split()))
H = list(map(int,input().split()))
H.sort(reverse = True)
count = 0
i = 0
while count < A and i < N:
q = H[i] // X
if q == 0:
count += 1
H[i] = 0
i += 1
else:
q1 = min(A - count,q)
count += q1
H[i] -= X * q1
i += 1
if count < A:
H.sort(reverse = True)
for i in range(min(A-count,N)):
H[i] = 0
if sum(H) <= Y * B:
print('Yes')
else:
print('No')