結果

問題 No.2329 Nafmo、イカサマをする
ユーザー kemunikukemuniku
提出日時 2023-05-28 15:19:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 695 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 86,820 KB
実行使用メモリ 270,268 KB
最終ジャッジ日時 2023-08-27 11:56:14
合計ジャッジ時間 7,953 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,528 KB
testcase_01 AC 72 ms
71,536 KB
testcase_02 AC 74 ms
71,220 KB
testcase_03 WA -
testcase_04 AC 72 ms
71,316 KB
testcase_05 AC 74 ms
71,216 KB
testcase_06 AC 73 ms
71,224 KB
testcase_07 AC 71 ms
71,380 KB
testcase_08 WA -
testcase_09 AC 70 ms
71,312 KB
testcase_10 AC 70 ms
71,488 KB
testcase_11 AC 71 ms
71,396 KB
testcase_12 AC 71 ms
71,228 KB
testcase_13 AC 70 ms
71,036 KB
testcase_14 AC 70 ms
71,312 KB
testcase_15 WA -
testcase_16 AC 76 ms
75,764 KB
testcase_17 AC 72 ms
71,296 KB
testcase_18 AC 73 ms
71,400 KB
testcase_19 AC 87 ms
75,912 KB
testcase_20 AC 148 ms
97,468 KB
testcase_21 AC 80 ms
75,996 KB
testcase_22 WA -
testcase_23 AC 70 ms
71,504 KB
testcase_24 WA -
testcase_25 AC 75 ms
75,940 KB
testcase_26 WA -
testcase_27 AC 73 ms
71,404 KB
testcase_28 AC 72 ms
71,500 KB
testcase_29 AC 177 ms
106,832 KB
testcase_30 AC 73 ms
71,368 KB
testcase_31 WA -
testcase_32 AC 79 ms
75,956 KB
testcase_33 AC 74 ms
71,036 KB
testcase_34 AC 74 ms
71,408 KB
testcase_35 WA -
testcase_36 TLE -
testcase_37 AC 78 ms
75,992 KB
testcase_38 AC 77 ms
71,464 KB
testcase_39 TLE -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
N,M,K = map(int,input().split())
A = list(map(int,input().split()))
A.append(0)
x = K//2
y = K-x
old = A[:]
for i in range(x-1):
    new = set()
    for i in range(len(old)):
        for j in range(len(old)):
            new.add(old[i]+old[j])
    old = list(new)
one = old
old = A[:]
for i in range(y-1):
    new = set()
    for i in range(len(old)):
        for j in range(len(old)):
            new.add(old[i]+old[j])
    old = list(new)
two = old
one.sort()
two.sort()
ans = 0
for i in one:
    if M-i >= 0:
        index = bisect.bisect_right(two,M-i)-1
        if index != len(two):
            if two[index] + i <= M:
                ans = max(ans,two[index] + i)
print(ans)
0