Problem 3234 · Medium

Count the Number of Substrings With Dominant Ones

A substring is dominant when its count of ones is at least the square of its count of zeros. Count every dominant substring.

Open the interactive visualisation