Problem 1534 · Easy

Count Good Triplets

Count index triples whose pairwise gaps satisfy three limits by checking each middle index against candidates on its left and right. The visual highlights a qualifying triple.

Open the interactive visualisation