A 6×6 array contains digits from 0 to 9. You may apply the operations below any number of times, and you want to maximize the sum of all values in the array.
- Choose an integer i from 1 to 6 and add 1 to all six values in row i.
- Choose an integer i from 1 to 6 and subtract 1 from all six values in row i.
- Choose an integer i from 1 to 6 and add 1 to all six values in column i.
- Choose an integer i from 1 to 6 and subtract 1 from all six values in column i.
- Add 1 to all six values on the diagonal from the upper left to the lower right.
- Add 1 to all six values on the diagonal from the upper right to the lower left.
- Subtract 1 from all six values on the diagonal from the upper left to the lower right.
- Subtract 1 from all six values on the diagonal from the upper right to the lower left.
Each operation may be used without limit. Values always remain single digits: adding 1 to 9 gives 0, and subtracting 1 from 0 gives 9.
Consider the following array.
If 1 is added to the first row, the array becomes:
From there, if 1 is subtracted from the first column, the array becomes: