結果
| 問題 |
No.2730 Two Types Luggage
|
| コンテスト | |
| ユーザー |
rarpipipi
|
| 提出日時 | 2024-04-20 08:53:46 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 405 bytes |
| コンパイル時間 | 144 ms |
| コンパイル使用メモリ | 82,248 KB |
| 実行使用メモリ | 270,912 KB |
| 最終ジャッジ日時 | 2024-10-12 04:16:54 |
| 合計ジャッジ時間 | 10,896 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 TLE * 1 -- * 16 |
ソースコード
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)
rarpipipi