HBC222898[NOIP2003]麦森数,高精度,NOIP复赛,数学Kera'slinesegment题解

北笙凉宸 算法基础篇 57 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
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

HBC222898[NOIP2003]麦森数,高精度,NOIP复赛,数学Kera'slinesegment题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC222898[NOIP2003]麦森数 高精度 NOIP复赛 数学Kera'slinesegment题解