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

北笙凉宸 基本结构 119 0
挑战自我,勇攀编程高峰!全网最全C++题库,助您成为编程达人。

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

成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

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