AdvancedRating 2000
Block Sums Within Bounds
Count the blocks of consecutive numbers whose sum lies between lo and hi (inclusive).
Input
n, lo and hi; then n integers.
Output
One integer.
Sample 1
Input
3 -2 2 -2 5 -1
Output
3
Sample 2
Input
1 0 0 0
Output
1
Output appears here