Problem 2276 · Hard

Count Integers in Intervals

A segment tree over the integers marks whole ranges as covered and reads the covered count at its root.

Open the interactive visualisation