< Previous Next >
[Bit Manipulation] [Array] [Math] [Matrix]
Hint 1
Does the order, in which you do the operations, matter? Hint 2
No, it does not. An element will keep its original value if the number of operations done on it is even and vice versa. This also means that doing more than 1 operation on the same row or column is unproductive. Hint 3
Try working backward, start with a matrix of all zeros and try to construct grid using operations. Hint 4
Start with operations on columns, after doing them what do you notice about each row? Hint 5
Each row is the exact same. If we then flip some rows, that leaves only two possible arrangements for each row: the same as the original or the opposite.