Problem 1420 · Hard

Build Array Where You Can Find The Maximum Exactly K Comparisons

Count arrays by their running maximum and the number of times that maximum changes, using a table over largest value and cost.

Open the interactive visualisation