Python3 Solution
\n\nclass Solution:\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        row=len(matrix)\n        col=len(matrix[0])\n        ans=0\n      
\n```\nclass Solution:\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        row=len(matrix)\n        col=len(matrix[0])\n        ans=0\n        for r in range(1,row):\n            for c in range(col):\n                matrix[r][c]+=matrix[r-1][c] if matrix[r][c] else 0\n\n        for r in range(row):\n            matrix[r].sort(reverse=True)\n            for c in range(col):\n                ans=max(ans,(c+1)*matrix[r][c])\n        return ans                \n```
['Python', 'Python3']