Maximize the logs held by the k/2 secure warehouses after distributing delivery logs.
You are given an array delivery_logs representing the number of logs in each delivery unit and an integer k representing the total number of warehouses. Each warehouse can only store logs from a single delivery unit (logs from different deliveries cannot mix). There are k/2 secure warehouses. Return the maximum number of secure logs possible. (40 minutes)
Example 1: Input: delivery_logs = [3,5,9,6], k = 4 Output: 9 Explanation: Take 5 logs from the 3rd delivery into warehouse 1, all 6 logs from the 4th delivery into warehouse 2, the remaining 4 logs from the 3rd delivery into warehouse 3, and all logs from the 2nd delivery into warehouse 4. Warehouses become [5,6,4,5]. The secure warehouses (k/2 = 2) are the two largest: 5 and 4, which sum to 9.
Example 2: Input: delivery_logs = [5,5,5,5,5,5], k = 4 Output: 10 Explanation: Pick any 4 deliveries and place 5 logs each in 4 warehouses. Warehouses become [5,5,5,5]. Any two secure warehouses sum to 10.


