Problem 4013 · Hard

Count Subarrays With Even Odd Ratio II

Turn the ratio test into a running score and count earlier prefix scores that are large enough.

Open the interactive visualisation