結果
| 問題 |
No.37 遊園地のアトラクション
|
| コンテスト | |
| ユーザー |
tktk_snsn
|
| 提出日時 | 2020-12-30 20:24:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 299 bytes |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 82,424 KB |
| 実行使用メモリ | 75,928 KB |
| 最終ジャッジ日時 | 2024-10-08 00:46:37 |
| 合計ジャッジ時間 | 4,255 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 27 |
ソースコード
T = int(input())
N = int(input())
C = list(map(int, input().split()))
V = list(map(int, input().split()))
dp = [0] * (T + 1)
for v, c in zip(V, C):
while v:
for i in reversed(range(c, T + 1)):
dp[i] = max(dp[i], dp[i - c] + v)
v //= 2
print(dp)
print(dp[T])
tktk_snsn