摘要: (1)线段树数组开的太小会WA。(2)强制类型转换的时机不对会溢出,这么幼稚的问题竟然疏忽了。(3)插入新线段的时候修改就深入到线段元会TLE,不妨使用lazy的思想,线段树结点中的h域就是tag。(4)离散化,脑海中竟然浮现的是Riemann-Stieltjes积分和Riemann积分的定义。#include #include #include using namespace std;const int MAXN = 40005;typedef struct { int a; int b; int h;}Building;typedef struct { int l;... 阅读全文
posted @ 2013-06-28 19:52 Sinker 阅读(193) 评论(0) 推荐(0) 编辑