Problem 2711 · Medium

Difference of Number of Distinct Values on Diagonals

For each cell, count distinct values on the diagonal above-left and below-right, then store the gap between the two counts.

Open the interactive visualisation