結果

問題 No.2730 Two Types Luggage
ユーザー anonymouslyanonymously
提出日時 2024-04-19 21:56:48
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 406 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 269,000 KB
最終ジャッジ日時 2024-04-19 21:57:36
合計ジャッジ時間 22,928 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,584 KB
testcase_01 AC 39 ms
51,968 KB
testcase_02 AC 83 ms
74,240 KB
testcase_03 AC 37 ms
51,840 KB
testcase_04 AC 202 ms
76,800 KB
testcase_05 AC 139 ms
76,800 KB
testcase_06 AC 50 ms
61,696 KB
testcase_07 AC 35 ms
51,968 KB
testcase_08 AC 43 ms
52,224 KB
testcase_09 AC 127 ms
76,544 KB
testcase_10 AC 51 ms
66,048 KB
testcase_11 AC 369 ms
206,552 KB
testcase_12 AC 1,270 ms
258,332 KB
testcase_13 AC 329 ms
174,472 KB
testcase_14 AC 424 ms
223,124 KB
testcase_15 AC 868 ms
97,536 KB
testcase_16 AC 192 ms
121,848 KB
testcase_17 AC 427 ms
232,604 KB
testcase_18 AC 454 ms
226,460 KB
testcase_19 AC 67 ms
78,976 KB
testcase_20 AC 187 ms
132,584 KB
testcase_21 AC 366 ms
215,952 KB
testcase_22 AC 450 ms
249,464 KB
testcase_23 AC 226 ms
89,600 KB
testcase_24 AC 322 ms
156,328 KB
testcase_25 AC 337 ms
208,568 KB
testcase_26 AC 114 ms
95,616 KB
testcase_27 AC 423 ms
214,892 KB
testcase_28 AC 186 ms
137,904 KB
testcase_29 AC 421 ms
234,688 KB
testcase_30 AC 1,456 ms
89,984 KB
testcase_31 AC 324 ms
169,396 KB
testcase_32 AC 248 ms
151,064 KB
testcase_33 AC 1,901 ms
268,564 KB
testcase_34 AC 1,808 ms
269,000 KB
testcase_35 AC 1,962 ms
266,304 KB
testcase_36 TLE -
testcase_37 AC 1,778 ms
266,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,W=map(int,input().split())
A=[int(_) for _ in input().split()]
B=[int(_) for _ in input().split()]
C=[int(_) for _ in input().split()]

A.sort(reverse=True)
S=[0]
for i in range(n):
    S.append(S[-1]+A[i])

V=0
for i in range(1<<m):
    w=sum(B[j] for j in range(m) if i & (1<<j))
    if w<=W:
        v=sum(C[j] for j in range(m) if i & (1<<j))+S[min(W-w,n)]
        if v>V:
            V=v

print(V)
0