A Simple Problem with Integers
Time Limit: 5000MS
Memory Limit: 131072K
Total Submissions: 56971
Accepted: 17284
Case Time Limit: 2000MS
Description
You have N integers, A1,
A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval.
Input
The first line contains two numbers N and
Q. 1 ≤ N,Q ≤ 100000.
The second line contai......
阅读全文