結果
問題 | No.1736 Princess vs. Dragoness |
ユーザー |
👑 ![]() |
提出日時 | 2021-11-12 21:50:31 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 574 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 82,416 KB |
実行使用メモリ | 62,380 KB |
最終ジャッジ日時 | 2024-11-25 18:06:06 |
合計ジャッジ時間 | 2,816 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 |
ソースコード
""""""import sysfrom sys import stdindef solve(K):h = [max(0,i-K) for i in H]a = Ab = Bx = Xy = Yfor i in range(N):mov = min(a , h[i] // x)h[i] -= mov * xa -= movh.sort()h.reverse()for i in range(N):if h[i] > 0 and a > 0:a -= 1h[i] = 0if sum(h) <= Y*B:return Trueelse:return FalseN,A,B,X,Y = map(int,stdin.readline().split())H = list(map(int,stdin.readline().split()))if solve(0):print ("Yes")else:print ("No")