| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 10 초 | 2048 MB | 6 | 3 | 3 | 50.000% |
There is a sequence $a_1, a_2, \ldots, a_n$ of length $n,ドル and it is guaranteed that each $a_i$ is an odd number.
There are two types of operations:
Given the initial sequence and the operations, perform them efficiently.
The first line of the input contains two positive integers $n$ and $q$ (1ドル \leq n, q \leq 2 \cdot 10^5$) representing the length of the sequence and the number of queries.
The second line contains $n$ odd numbers $a_1, a_2, \ldots, a_n$ (1ドル \leq a_i < 2^{20}$).
The following $q$ lines represent queries, each in one of the following two formats:
1 $\ell$ $r$ $x$ ": perform the first type of operation (1ドル \leq \ell \leq r \leq n,ドル the value $x$ is even and 0ドル \leq x < 2^{20}$).2 $\ell$ $r$": perform the second type of operation (1ドル \leq \ell \leq r \leq n$).All the values in the queries are integers.
For each query of type 2, output one line with an integer representing the answer.
10 10 969575 741825 24903 1047319 450475 256145 1045323 479255 810659 768323 1 5 6 3034 2 1 10 2 1 9 2 1 4 1 3 6 126904 2 5 5 2 9 9 1 7 7 853094 1 4 9 1025178 2 5 8
1045541 1012343 558151 580413 810659 527353