HDU 4267 A Simple Problem with Integers(树状数组)

There are a lot of test cases.The first line contains an integer N. (1 <= N <= 50000)The second line contains N numbers which are the initial values of A1, A2, … , AN. (-10,000,000 <= the initial value of Ai <= 10,000,000)The third line contains an integer Q. (1 <= Q <= 50000)Each of the following Q lines represents an operation."1 a b k c" means adding c to each of Ai which satisfies a <= i <= b and (i – a) % k == 0. (1 <= a <= b <= N, 1 <= k <= 10, -1,000 <= c <= 1,000)"2 a" means querying the value of Aa. (1 <= a <= N)

,比谁都感激这份“不能说出的爱”。

HDU 4267 A Simple Problem with Integers(树状数组)

相关文章:

你感兴趣的文章:

标签云: