Number of Substrings With Fixed Ratio
Turn each prefix of a binary string into one running key; two equal keys mark a substring with the requested zeros-to-ones ratio.
Turn each prefix of a binary string into one running key; two equal keys mark a substring with the requested zeros-to-ones ratio.