Given a grid.
A non empty subset of rows is considered good if the sum of elements in each column across the chosen subset is at most half of the size of the subset. That is, if the subset contains
Return an array containing the indices of the rows belonging to any good subset, sorted in ascending order. If there are multiple valid good subsets, return any of them. If no such subset exists, return an empty array.
Constraints:
m grid.length
n grid[i].length
m
n
grid[i][j] is either
Given a grid.
A non empty subset of rows is considered good if the sum of elements in each column across the chosen subset is at most half of the size of the subset. That is, if the subset contains
Return an array containing the indices of the rows belonging to any good subset, sorted in ascending order. If there are multiple valid good subsets, return any of them. If no such subset exists, return an empty array.
Constraints:
m grid.length
n grid[i].length
m
n
grid[i][j] is either