Skip to content

Latest commit

 

History

History

remove-all-ones-with-row-and-column-flips

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

< Previous                  Next >

Related Topics

[Bit Manipulation] [Array] [Math] [Matrix]

Hints

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.