Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Does the order, in which you do the operations, matter?
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.
Try working backward, start with a matrix of all zeros and try to construct grid using operations.
Start with operations on columns, after doing them what do you notice about each row?
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.