|
||||||||||
A Strange ProblemTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 700 Accepted Submission(s): 179 Problem Description You are given a strange problem. First you have got a sequence contains $N$ integers $A_{1},A_{2},A_{3},...A_{N}$.Then you should perform a sequence of $M$ operations. An operation can be one of the following: 1. Print operation $l,r$ . Print the value of $\sum\limits_{i=l}^{r}A_{i}$. 2. Modify operation $x$. Modify $A_{x}$ to ${2}^{A_{x}}$ 3. Add operation $l,r,x$. Add $x\: to\: A_{i}(l\leq i\leq r)$. As the value of print operation can be rather large, print the remainder after dividing the number by $2333333$. Input There are several test cases. In each test case: The first line contains two integers $N,M(1\leq N,M\leq 50000)$. The second line contains $N$ integers $A_{1},A_{2},A_{3},...A_{N}(1\leq A_{i}\leq {10}^{9},1\leq i\leq N)$ Each of the next $M$ lines begin with a number $type(1\leq type\leq 3)$. If $type=1$, there will be two integers more in the line: $l,r(1\leq l\leq r\leq N)$, which correspond the operation 1. If $type=2$, there will be one integer more in the line: $x(1\leq x\leq N)$, which correspond the operation 2. If $type=3$, there will be three integers more in the line: $l,r,x(1\leq l\leq r\leq N,1\leq x\leq {10}^{9})$, which correspond the operation 3. Output For each Print operation, output the remainder of division of the value by $2333333$. Sample Input
Sample Output
Source | ||||||||||
|