线段树面积并-杭电1542

#include  
#include 
#include 
#include  
using namespace std;
#define maxn 100010
struct node
{
	double x1,x2,y;
	int cover;
	node(double x1=0,double x2=0,double y=0,int cover=0):x1(x1),x2(x2),y(y),cover(cover){}
	bool friend operator<(node X,node Y)	//排序
	{
		return X.y=R)
	{
		col[rt]+=c;
		up(rt,L,R);
		return;
	}
	int m=(L+R)/2;
	if(a<=m)
	{
		update(L,m,rt<<1,a,b,c);
	}
	if(b>m)
	{
		update(m+1,R,rt<<1|1,a,b,c);
	}
	up(rt,L,R);
}
int main()
{
	int n,i,len,L,R,Case;
	double x1,x2,y1,y2,S;
	Case=1;
	while(~scanf("%d",&n)&&n)
 	{
		 S=0;
		 for(i=0;i

你可能感兴趣的:(线段树)