摘要: 题意: 给出一些值 然后给出你一些命令 按照命令输出 命令: C a b c 表示更新a ~ b的值加上 c Q a b 表示查询a~b的和输入: n m 表示有n个数 m 个操作 接下来 m 行为命令行思路: 就是简单的线段树成段更新求和 Tips: ※ 询问的时候要 pushdown ※ 注意范围问题吖~Code: View Code 1 #include <stdio.h> 2 #include <cstring> 3 using namespace std; 4 #define LL long long 5 6 const int MAXN = 100010;. 阅读全文
posted @ 2012-10-17 21:37 Griselda. 阅读(310) 评论(0) 推荐(0) 编辑