結果
| 問題 |
No.617 Nafmo、買い出しに行く
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-08 07:27:03 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 254 bytes |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 42,240 KB |
| 最終ジャッジ日時 | 2024-11-29 11:46:48 |
| 合計ジャッジ時間 | 26,267 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | AC * 12 RE * 1 TLE * 7 |
ソースコード
n, k = map(int, input().split())
dp = [False for _ in range(k + 1)]
dp[0] = True
ans = 0
for _ in range(n):
a = int(input())
for i in range(k + 1, a - 1, -1):
if dp[i - a]:
dp[i] = True
ans = max(ans, i)
print(ans)