https://leetcode.com/problems/delete-greatest-value-in-each-row


Success


```python
import math

class Solution:
    def deleteGreatestValue(self, grid: List[List[int]]) -> int:
        #2023/02/14 04:45
        answer = 0
        while len(grid[0]) > 0:
            greatest = -math.inf
            for index, row in enumerate(grid.copy()):
                max_value = max(row)
                grid[index].remove(max_value)
                if max_value > greatest:
                    greatest = max_value
            answer += greatest
        return answer
        #2023/02/14 04:50
```
