One line solution. Runtime 100%!!!
\n\nclass Solution:\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        return max(max(map(mul, sorted(row, reverse = True), count(1))) fo
![\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 2023-11-26 \u0432 16.55.31.png](https://assets.leetcode.com/users/images/aec4765b-f086-4771-9953-fb62db621aea_1701006958.9566693.png)\n```\nclass Solution:\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        return max(max(map(mul, sorted(row, reverse = True), count(1))) for row in accumulate(matrix, lambda row_s, row: list(map(lambda s, n: (s+n)*n, row_s, row))))\n```\n> More readable\n```\nclass Solution:\n    def largestSubmatrix(self, matrix: List[List[int]]) -> int:\n        def prefix_sum(row_s, row):\n            return list(map(lambda s, n: (s+n)*n, row_s, row))\n        return max(max(map(mul, sorted(row, reverse = True), count(1))) for row in accumulate(matrix, prefix_sum))\n```
['Python3']