結果

問題 No.2730 Two Types Luggage
ユーザー miho-4miho-4
提出日時 2024-04-19 22:55:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 908 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 267,088 KB
最終ジャッジ日時 2024-04-19 22:55:58
合計ジャッジ時間 15,499 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,352 KB
testcase_01 AC 36 ms
52,224 KB
testcase_02 AC 45 ms
60,672 KB
testcase_03 AC 37 ms
52,480 KB
testcase_04 AC 62 ms
62,976 KB
testcase_05 AC 45 ms
60,032 KB
testcase_06 AC 46 ms
59,392 KB
testcase_07 AC 36 ms
51,712 KB
testcase_08 AC 37 ms
51,840 KB
testcase_09 AC 48 ms
60,544 KB
testcase_10 AC 55 ms
66,944 KB
testcase_11 AC 406 ms
205,696 KB
testcase_12 AC 841 ms
264,508 KB
testcase_13 AC 336 ms
174,496 KB
testcase_14 AC 374 ms
207,612 KB
testcase_15 AC 465 ms
107,520 KB
testcase_16 AC 202 ms
118,456 KB
testcase_17 AC 450 ms
231,760 KB
testcase_18 AC 431 ms
230,824 KB
testcase_19 AC 72 ms
79,616 KB
testcase_20 AC 216 ms
132,288 KB
testcase_21 AC 363 ms
203,684 KB
testcase_22 AC 488 ms
255,984 KB
testcase_23 AC 104 ms
89,600 KB
testcase_24 AC 248 ms
142,148 KB
testcase_25 AC 404 ms
207,672 KB
testcase_26 AC 136 ms
102,016 KB
testcase_27 AC 359 ms
202,916 KB
testcase_28 AC 229 ms
140,304 KB
testcase_29 AC 432 ms
232,428 KB
testcase_30 AC 439 ms
92,156 KB
testcase_31 AC 334 ms
169,300 KB
testcase_32 AC 276 ms
174,568 KB
testcase_33 AC 855 ms
266,072 KB
testcase_34 AC 908 ms
267,088 KB
testcase_35 AC 907 ms
264,348 KB
testcase_36 AC 907 ms
264,536 KB
testcase_37 AC 856 ms
264,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,w=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

A.sort(reverse=1)
T=[0]*(n+1)
for i in range(n):
	T[i+1]+=T[i]
	T[i+1]+=A[i]
	
ans=0

for bit in range(2**m):
	W,V=0,0
	for i in range(m):
		if bit>>i&1:
			W+=B[i]
			V+=C[i]
	if W<=w:
		ans=max(ans,V+T[min(w-W,n)])
print(ans)
0