Company: IBM_21july
Difficulty: easy
Column-wise Visibility Adjustment A web page renderer lays its content out on a grid with n rows and m columns. The cell in row i and column j holds an integer visibility score visibilityScore[i][j] . The renderer needs every column to read as strictly increasing from top to bottom: for a column j and any two rows i < k , the final scores must satisfy visibilityScore[i][j] < visibilityScore[k][j] . The only edit allowed is raising a score. Increasing one cell by one unit costs one unit; a cell may be raised by any amount, or left alone. Scores in different columns never interact. Print the minimum total cost that makes every column strictly increasing downward. Input Format The first line contains n , the number of rows. The second line contains m , the number of columns. Each of the next n lines contains m space-separated integers - row i of visibilityScore . Output Format Print a single integer - the minimum total adjustment cost - followed by a newline. The answer can exceed t