题意:n个点.m个操作.两种操作类型.C X Y K 表示区间[x,y]上每一个点值加k.Q X Y 求区间[x,y]的和 分析:线段树区间求和,裸模板 注意:结果会超int,要用long long 表示,假设是在hust上交结果要用%I64d.poj的话则用%lld 代码: #include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algor…
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 92127 Accepted: 28671 Case Time Limit: 2000MS 描述 You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operatio…
题目传送门 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 142198 Accepted: 44136 Case Time Limit: 2000MS Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One…
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 57666 Accepted: 17546 Case Time Limit: 2000MS Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of…
A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 60745 Accepted: 18522 Case Time Limit: 2000MS Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of…