There is a binary grid, of m * n, 1<=m<=100 and 1<=n<=100. Now, at any moment we can take any column and flip its elements , i.e., 0 to 1 and 1 to 0, now by doing this operation exactly k times (k <=m && k>=1) , we need to find the maximum number of rows having all elements as 1.
The question was worded too big, just made it smaller by highlighting the gist.
Please anybody Solve this, also tell the intuition.