Problem 4054 · Medium

Count Shadow Pairs I

Count rising index pairs whose middle stays at or above the left value. A smaller value between them breaks the pair.

Open the interactive visualisation