Hi please I need some help with this :
Given this square generated by XORing the values of indices of rows and columns (I believe it's called munching squares (check picture)
let's take for example the black rectangle:
I noticed that the sum of the values of the green square is equal to : the dimensions of the square (2x2) multiplied by the number of rows in the whole black rectangle (4) + the sum of the values in the blue square (2) $5+4+5+4 = 2\times2\times4 + 2$
the same on the second picture the sum of values on the green rectangle is equal to the dimensions of the rectangle (2 x 3) multiplied by the number of rows in the whole black rectangle (4) + the sum of the blue rectangle (7) $4+5+5+4+6+7 = 2\times3\times4 + 7 $
so in general given a rectangle starting from the top left corner: if we take a rectangle of any shape (but it must be in the bottom right corner of the big rectangle) the sum of the values in this rectangle are equal to the product of its dimension and the number of rows in the big rectangle + the sum of values of the rectangle of the same shape but starting at the top left
I am sorry I know I did not express myself correctly but I hope that you understood what I wanted to say. I wanna know why this rule exists?
Thank you