Sometimes long stories are very boring. So we decided to make statement as short as possible!
You have two integer arrays of size n: X and P. Your task is to perform q queries. There are three types of queries:
- 1
x: set - 2
p: set - 3 a b: find
Input format
The first line of input contains two space separated integers n and q (
The second line of input contains n space separated integers
The third line of input contains n space separated integers
Then q lines follow. The i-th of them contains parameters of the i-th query.
The i-th line can be:
- 1
x ( , ) - parameters for first type query or - 2
p ( , ) - parameters for second type query or - 3 a b (
) - parameters for third type query
Output format
For each third type query print the answer for it.
3 4 1 3 0 2 -1 10 3 1 3 1 3 1 2 2 5 3 1 3
2 4
Please login to use the editor
You need to be logged in to access the code editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor