in problem moment set interval you interval ab set interval cd set cad cbd also path interval I1 set interval i2 set sequence successive move start I1 reach I2Your program handle query follow type 1 x y xy add new interval xy set interval the length new interval guarantee strictly great previous interval 2 b ab answer question path ath onebase add interval bth onebase add interval answer query note initially set interval