Optimal Array Rounding with Sum Preservation

medium