Given a matrix with 0 and 1’s, find the largest rectangle of all 1’s in the matrix. The rectangle can be formed by swapping any pair of columns of given matrix.
The first line of input contains an integer T denoting the number of test cases.
First line of each test case contains two elements R and C.The following line contains R*C numbers each (representing the matrix).
print the max area in a new line for each test case.
1 1 1 0 1 1
1 0 1 1
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.