摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1698线段树,成段更新只查询全部的和sum[1],没写query 1 #include <stdio.h> 2 3 #define lson l, m, root<<1 4 #define rson m+1, r, root<<1|1 5 #define N 100100 6 7 int sum[N<<2], color[N<<2]; 8 9 void push_up(int root)10 {11 sum[root] = sum[root<& 阅读全文
posted @ 2013-02-18 14:24 Yuan1991 阅读(159) 评论(0) 推荐(0)