Problem 3452 · Easy
An index is good when it beats the values k steps away on each side that exist; sum the good values.
Open the interactive visualisation