結果

問題 No.914 Omiyage
ユーザー mlihua09mlihua09
提出日時 2020-09-13 02:57:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 557 ms
コンパイル使用メモリ 87,200 KB
実行使用メモリ 76,172 KB
最終ジャッジ日時 2023-08-30 20:22:41
合計ジャッジ時間 3,569 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,004 KB
testcase_01 AC 79 ms
76,116 KB
testcase_02 AC 73 ms
75,832 KB
testcase_03 AC 78 ms
76,172 KB
testcase_04 AC 75 ms
76,104 KB
testcase_05 AC 69 ms
71,432 KB
testcase_06 AC 71 ms
71,272 KB
testcase_07 AC 69 ms
71,272 KB
testcase_08 AC 72 ms
75,948 KB
testcase_09 AC 70 ms
71,320 KB
testcase_10 AC 76 ms
76,088 KB
testcase_11 AC 74 ms
75,860 KB
testcase_12 AC 77 ms
76,080 KB
testcase_13 AC 76 ms
76,112 KB
testcase_14 AC 77 ms
76,148 KB
testcase_15 AC 75 ms
76,056 KB
testcase_16 AC 75 ms
75,980 KB
testcase_17 AC 77 ms
76,004 KB
testcase_18 AC 68 ms
71,100 KB
testcase_19 AC 67 ms
71,436 KB
testcase_20 AC 69 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


N, M, K = map(int, input().split())

DP = [0] * K + [1]

for i in range(N):
    dp = [0] * (K + 1)
    for a in map(int, input().split()):
        for i in range(K):
            if i + a <= K and DP[i + a]:
                dp[i] = 1
    DP = dp

try:
    print(DP.index(1))
except:
    print(-1)
0