题目链接:https://www.luogu.org/problem/P1502 扫描线的板子题,把每个点看成矩形,存下边(x,y,y+h-1,li)和(x+w-1,y,y+h-1),在按横坐标扫线段更新y区间,线段树维护区间最大值 #include<iostream> #include<algorithm> using namespace std; #define ll long long #define ls l,mid,rt<<1 #define rs mid+1…
将每个点拓展为矩形,将\(y\)离散,延\(x\)轴扫描,每次更新最值 用了一百年的pushdown操作疑似有问题,亦或这道题特殊,我乱改了pushdown位置就过了,我能怎么办,WA了一发,y数组没开够又RE了一发... 话说POJ上的情书让我回忆起童年那个彪悍的女孩,一晃十年了 Fleeting time does not blur my memory of you. Can it really be 4 years since I first saw you? I still rememb…