Problem 2750 · Medium

Ways to Split Array Into Good Subarrays

Count splits where every subarray has exactly one 1, using dp[i] = sum of dp[j] over valid starts j.

Open the interactive visualisation