#P16524. 余生的第一天
余生的第一天
Background

Pressing the shutter again and again without thinking.
Is it to capture the happiness at that moment?
Or to capture who I was at that moment?
Problem Description
There is a sequence with elements.
There are operations. Each operation is one of the following two types:
- Query. Given , , and , compute:
- Point update. Given and , set to .
Input Format
This problem is forced online. For , , or in each operation, let the answer to the previous query be . Initially, .
Then decrypt as follows:
Here, is the bitwise XOR operation. If , please swap and .
The first line contains two integers and .
The second line contains integers representing .
The next lines each contain either 1 l r V or 2 w k, representing an operation.
Output Format
For each query, output one integer per line as the answer.
5 5
-2 1 3 -4 8
1 1 5 3
2 1 7
2 3 -6
1 2 4 5
1 1 5 2
0
11
12
Hint
Constraints
Let be the maximum value among all within a test point.
For of the data, it is guaranteed that: , , , $\lvert s_i \rvert,\lvert V \rvert,\lvert k \rvert \le 10^8$, and .
| Subtask | Score | Special Property | |||
|---|---|---|---|---|---|
| None | |||||
| < | ^ | ||||
| ^ | |||||
| A | |||||
| ^ | B | ||||
| None | |||||
Special Property A: There are no update operations.
Special Property B: .
Translated by ChatGPT 5