grid whose rows all have the same length. The score starts at zero. While the table is not empty, play a round:
1. Remove the largest number from every row (if there are ties, any one of them).
2. Take the largest of the numbers removed this round and add it to the score.
Return the final score.grid=[[4, 9, 1], [8, 2, 8]] → 19
Round 1 removes 9 and 8 and scores 9. Round 2 removes 4 and 8 and scores 8. Round 3 removes 1 and 2 and scores 2. Total 9 + 8 + 2 = 19.
grid=[[3], [0], [5]] → 5
A single round takes 3, 0 and 5, scoring 5.
grid=[[4, 9, 1], [8, 2, 8]]
19
Run checks the first 3 tests in your browser. Submit checks all 102 tests on the server, hidden ones included.