Spoj questions involving Segment Trees