You are locked in a parallel universe and for you to be able to escape you have to answer
U x val
- Change the value of to .Q x y val
- Print . Here, refers to bitwise AND.
Constraints
For all subtasks:
Subtask 1 [25%]
Subtask 2 [30%]
There will be at most Q
queries.
Subtask 3 [45%]
No additional constraints.
Input Specification
On the first line, you will find
On the second line, you will find
On the next
Output Specification
For each Q
type query, print each result on a different line.
Sample Input
Copy
3 3
5 7 15
Q 1 3 7
U 1 0
Q 1 3 15
Sample Output
Copy
5
0
Comments