[Python] Hungarian, 5 lines
Hungarian problem.\n\nTime O(100^3)\nSpace O(100^2)\n\n\n\nPython\npy\n    def maxScore(self, grid: List[List[int]]) -> int:\n        A = numpy.array([[0] * 101
Hungarian problem.\n\nTime `O(100^3)`\nSpace `O(100^2)`\n<br>\n\n\n**Python**\n```py\n    def maxScore(self, grid: List[List[int]]) -> int:\n        A = numpy.array([[0] * 101 for r in grid])\n        for i,r in enumerate(grid):\n            for a in r:\n                A[i][a] = -a\n        return int(-A[scipy.optimize.linear_sum_assignment(A)].sum())\n```\n
[]