1297. Maximum Number of Ones
You are given a `width x height` matrix filled with 0s. You may set some cells to 1, subject to the rule that every `sideLength x sideLength` sub-square contains at most `maxOnes` ones. Return the maximum total number of 1s the whole matrix can contain.