結果
| 問題 | No.2730 Two Types Luggage |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-03 21:51:11 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 441 bytes |
| 記録 | |
| コンパイル時間 | 469 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 289,344 KB |
| 最終ジャッジ日時 | 2026-05-19 10:03:10 |
| 合計ジャッジ時間 | 15,153 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 12 WA * 7 TLE * 2 -- * 14 |
ソースコード
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 = 0 for i in range(2**M): lst = [] for j in range(M): if (i >> j) & 1: lst.append(j) w = sum(B[i] for i in lst) v = sum(C[i] for i in lst) if W < w: continue j = 0 while j < N and w + A[j] <= W: w += 1 v += A[j] j += 1 ans = max(ans, v) print(ans)