摘要:
http://www.notonlysuccess.com/index.php/segment-tree-complete/comment-page-2/#comment-4139题意:给一组数据,有两个询问,一种是给区间[a,b]上每个数加c,另一种是求区间[a,b]的和!#include <cstdio>#include <algorithm>using namespace std; #define lson l , m , rt << 1#define rson m + 1 , r , rt << 1 | 1#define LL long 阅读全文