結果

問題 No.2730 Two Types Luggage
ユーザー rarpipipirarpipipi
提出日時 2024-04-20 08:53:46
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 405 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 271,476 KB
最終ジャッジ日時 2024-04-20 08:53:59
合計ジャッジ時間 11,635 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
57,856 KB
testcase_01 AC 37 ms
51,968 KB
testcase_02 AC 61 ms
63,360 KB
testcase_03 AC 40 ms
56,704 KB
testcase_04 AC 85 ms
75,664 KB
testcase_05 AC 58 ms
70,400 KB
testcase_06 AC 48 ms
61,824 KB
testcase_07 AC 38 ms
51,968 KB
testcase_08 AC 41 ms
52,224 KB
testcase_09 AC 61 ms
75,904 KB
testcase_10 AC 53 ms
65,408 KB
testcase_11 AC 402 ms
205,860 KB
testcase_12 AC 844 ms
264,260 KB
testcase_13 AC 296 ms
174,260 KB
testcase_14 AC 378 ms
207,464 KB
testcase_15 AC 497 ms
109,012 KB
testcase_16 AC 168 ms
118,032 KB
testcase_17 AC 696 ms
267,600 KB
testcase_18 AC 564 ms
265,600 KB
testcase_19 AC 73 ms
81,152 KB
testcase_20 AC 208 ms
153,544 KB
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,w=map(int,input().split())
a=sorted(list(map(int,input().split())),reverse=True)
b=list(map(int,input().split()))
c=list(map(int,input().split()))

ans=sum(a[:min(n,w)])

for i in range(1,1<<m):
    sum_w=0
    v=0
    for j in range(m):
        if i>>j&1==1:
            sum_w+=b[j]
            v+=c[j]

    if sum_w>w:
        continue
    v+=sum(a[:min((w-sum_w),n)])
    ans=max(ans,v)

print(ans)
0