记录三个域,每次更新相关信息之后传递上来。sum【】:当前节点的总共合法区间(被覆盖至少两次)cover【】:当前节点区间被覆盖次数once【】:区间内被覆盖一次的总量其他的独立思考应该能想出来View Code #include<cstdio>#include<cstring>#include<algorithm>using namespace std;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn = 2222;double sum[maxn<&l Read More
posted @ 2012-01-23 12:49 Because Of You Views(313) Comments(0) Diggs(0) Edit