Problem 3709 · Medium
Times arrive in increasing order, so prefix sums and binary search answer each range query.
Open the interactive visualisation