Question
Fair Load Cap
You are given
Split the array into exactly
Minimize the maximum load assigned to any worker.
Input
The first line contains KaTeX can only parse string typed expression and KaTeX can only parse string typed expression.
The second line contains KaTeX can only parse string typed expression positive integers.
Output
Print the minimum possible value of the maximum group sum.
Example
Input:
Split as [7, 2, 5] and [10, 8]. The maximum load is 18, and no split can make it smaller.
5 2
7 2 5 10 8Output:18Explanation:Split as [7, 2, 5] and [10, 8]. The maximum load is 18, and no split can make it smaller.