結果
| 問題 |
No.1736 Princess vs. Dragoness
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-11-12 22:30:42 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 681 bytes |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-11-25 19:47:25 |
| 合計ジャッジ時間 | 9,982 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 13 |
ソースコード
n,a,b,x,y = map(int,input().split())
h = list(map(int,input().split()))
# n:敵の数 a:撃てる回数 b:撃てる回数 x:a与ダメージ y:b与ダメージ
def magic_a(x,h):
h[h.index(max(h))] -= x
return h
def magic_b(y,h):
for enemy_num in range(n):
if h[enemy_num]<=y:
y -= h[enemy_num]
h[enemy_num]=0
else:
h[enemy_num]-=y
return h
while True:
if a==0:
break
h = magic_a(x,h)
a -= 1
while True:
if b==0:
break
h = magic_b(y,h)
b -= 1
judge = True
for monster in h:
if monster>0:
judge = False
if judge:
print("Yes")
else:
print("No")