Problem 2421 · Hard

Number of Good Paths

Count tree paths with equal endpoint values and no larger value between them.

Open the interactive visualisation