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.
Count arrays by their running maximum and the number of times that maximum changes, using a table over largest value and cost.