Problem 2963 · Hard

Count the Number of Good Partitions

Count partitions where no value appears in two different subarrays, using a prefix DP over closed segments.

Open the interactive visualisation