
You are given a 0-indexed 2D integer array nums . Initially, your score is 0 . Perform the following operations until the matrix becomes empty:
From each row in the matrix, select the largest number and remove it. In the case of a tie, it does not matter which number is chosen.
Identify the highest number amongst all those removed in step 1. Add that number to your score .
Return the final score .
1 <= nums.length <= 3001 <= nums[i].length <= 5000 <= nums[i][j] <= 10 ^3