Each square of an n×n grid is coloured either blue or red, where n is a positive integer. There are k blue cells in the grid. Pat adds the sum of the squares of the numbers of blue cells in each row to the sum of the squares of the numbers of blue cells in each column to form SB. He then performs the same calculation on the red cells to compute SR.
If SB−SR=50, determine (with proof) all possible values of k. combinatoricscombinatorial geometryColoring