← 返回 amazon 的题目列表Minimize Maximum Parcels
类型:online_judge
In the context of logistics, you need to distribute a given number of parcels onto trucks. The objective is to minimize the maximum number of parcels on any truck. Given an integer array that represents the weight of each parcel, and the number of trucks available, design an algorithm to find a strategy that minimizes the maximum weight on any truck. Input: Array of parcel weights and number of available trucks Output: The minimized maximum weight on any truck after the distribution.
Example
Input
3
10 20 30