Problem Brief
Maximize Strength of Machines
FULLTIMEOA
There are n machines each equipped with m power units (m >= 2). The power of the jthunit in the i-thmachine is denoted as machine_power[i][j]. The strength of a machine is defined as the minimum power among all its power units. We want to maximize the sum of the strength of all possible machines. For this, we can perform a 3-step operation multiple times (possibly 0):
Find the max sum of the strength of all machines.
Note:
1Example 1
Input
n = 3, m = 2, machine_power = [[1,5],[4,3],[2,10]]
Output
16
Explanation
The operation are as follows:
Select machine 1 and transfer the unit with power 1 to machine 2. now machine powers are = [[5],[1,4,3],[2,10]]
Select machine 3 and transfer the unit with power 2 to machine 2 now machine powers are = [[5],[1,2,4,3],[10]]
The sum of strenght is min(5) + min(1,2,4,3) + min(10) = 16
Return 16.