table of non-negative integers. One step adds 1 to any single cell.
Every column must be **strictly increasing** from top to bottom. What is the minimum number of steps required?table=[[4, 1], [2, 1], [5, 0]] → 8
First column: 2 → 5 (3 steps), 5 → 6 (1 step). Second column: 1 → 2 (1 step), 0 → 3 (3 steps). 8 in total.
table=[[0, 7, 3], [1, 8, 9]] → 0
Every column already grows strictly from top to bottom.
table=[[2], [2], [2], [2]] → 6
table=[[4, 1], [2, 1], [5, 0]]
8
Run checks the first 3 tests in your browser. Submit checks all 87 tests on the server, hidden ones included.