Can we formulate the problem using a segment tree?

Cited by 2