Kera likes line segments. He hasnnnline segments, and each line segment can be described bylil_iliandrir_irion the number axis. Moreover, each line segment Kera has its preferred valuevalival_ivali.
Kera likes line segments. He has nnn line segments, and each line segment can be described by lil_ili and rir_iri on the number axis. Moreover, each line segment Kera has its preferred value valival_ivali. Then there are mmm operations: (op=1,li,ri,vali)(op = 1, l_i, r_i, val_i)(op=1,li,ri,vali) — Add a line segment(li,ri,vali)(l_i,r_i,val_i)(li,ri,vali) on the number axis, according to the above. (op=2,L,R)(op = 2,L,R)(op=2,L,R) — Query the maximum difference of preferred values of all line segments that are fully contained by the interval represented by [L, R]. In addition, a line segment(li,ri,vali)(l_i, r_i, val_i)(li,ri,vali) fully contained by the interval(L,R)(L,R)(L,R) means: L≤li≤ri≤R L leq l_i leq r_i leq R L≤li≤ri≤R