Given a matrix of m rows and n columns with only 0s and 1s

Each row represents a binary representation of an integer

You can to infinite operations

In one operation you toggle one row/column

Finally maximize the sum of all the m numbers in binary representation.

example

4 2//m and n

0 1

0 0

0 1

0 1

ans -11

toggle the first column and matrix becomes

1 1-----3

1 0-----2

1 1-----3

1 1-----3