結果

問題 No.2329 Nafmo、イカサマをする
ユーザー ntudantuda
提出日時 2023-06-10 12:51:13
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 429 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 318,252 KB
最終ジャッジ日時 2023-08-30 21:31:11
合計ジャッジ時間 10,862 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
75,976 KB
testcase_01 AC 72 ms
71,012 KB
testcase_02 AC 73 ms
71,468 KB
testcase_03 AC 74 ms
71,284 KB
testcase_04 AC 76 ms
71,012 KB
testcase_05 AC 71 ms
71,452 KB
testcase_06 AC 71 ms
71,184 KB
testcase_07 AC 70 ms
71,420 KB
testcase_08 AC 104 ms
85,352 KB
testcase_09 AC 72 ms
71,256 KB
testcase_10 AC 75 ms
71,292 KB
testcase_11 AC 76 ms
75,760 KB
testcase_12 AC 77 ms
75,980 KB
testcase_13 AC 78 ms
75,756 KB
testcase_14 AC 72 ms
71,328 KB
testcase_15 AC 75 ms
71,236 KB
testcase_16 AC 80 ms
75,884 KB
testcase_17 AC 72 ms
71,196 KB
testcase_18 AC 73 ms
71,244 KB
testcase_19 AC 110 ms
86,892 KB
testcase_20 AC 80 ms
76,032 KB
testcase_21 AC 78 ms
75,756 KB
testcase_22 AC 80 ms
75,920 KB
testcase_23 AC 77 ms
75,716 KB
testcase_24 AC 73 ms
71,180 KB
testcase_25 AC 80 ms
76,064 KB
testcase_26 AC 72 ms
71,448 KB
testcase_27 AC 75 ms
75,636 KB
testcase_28 AC 73 ms
71,308 KB
testcase_29 AC 163 ms
103,636 KB
testcase_30 AC 79 ms
75,940 KB
testcase_31 AC 72 ms
71,104 KB
testcase_32 AC 72 ms
71,172 KB
testcase_33 AC 78 ms
75,824 KB
testcase_34 AC 78 ms
75,720 KB
testcase_35 AC 79 ms
76,048 KB
testcase_36 AC 1,127 ms
245,944 KB
testcase_37 AC 79 ms
76,084 KB
testcase_38 AC 79 ms
76,020 KB
testcase_39 AC 588 ms
186,348 KB
testcase_40 AC 316 ms
148,608 KB
testcase_41 TLE -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,K = map(int,input().split())
A = list(map(int,input().split())) + [0]

#N,M,K = 100,1000000000,6
#from random import randint
#A = [randint(1,1000000000) for _ in range(N)]

S = [0]
for i in range(K):
    S2 = set()
    for a in A:
        for b in S:
            d = a + b
            if d <= M:
                S2.add(d)
    S = S2
    #print(i,len(S))

ans = 0
for s in S:
    if s <= M:
        ans = max(ans,s)
print(ans)
0