Array
2897. Apply Operations on Array to Maximize Sum of Squares
The AND/OR move never creates or destroys a set bit, so the per-column bit count is invariant: treat the array as 30 piles of chips and greedily concentrate them into k numbers.
Loading…