PROGRAMMING:K-th minimum
You have an array: $$a_ 1,a_ 2,a_ 3,......,a_ For this array, you have to answer some questions.
For each query, you will be given an interval $$[l, R] $$and two integers $$p $$and $$k $$. Your task is to find $$p $$and $$a_ L,a_{ L+1},a_{ L+2},......,a_ The nearest distance between R and K.
$$p $$and $$a_ The distance between I $$is $$| p - A_ i|$$。
For example:
$$A=$$ { $$31,2,5,45,4$$ }, $$L = 2,R = 5,p = 3,K = 2$$
$$|p - a_ 2| = 1,|p - a_ 3| = 2,|p - a_ 4| = 42,|p-a_ 5|=1$$
The sorted distance is {$$1,1,2,42 $$}.
So the shortest distance of $$2 $$is $$1 $.
###Input format:
In the first line, enter a $$t (1 / Leq T / Leq 3) $$to represent the number of test data groups.
For each group of test data:
The first line gives two integers, $$n $$and $$m, (1 / Leq n, M / Leq 10 ^ 5) $$, representing the length of the array and the number of queries.
The second line contains $$n $$spaces separated integers $$a_ 1,a_ 2,a_ 3,......,a_ n(1 \leq a_ I / Leq 10 ^ 6) $$, to ensure that the array elements are not repeated
Next, $$M $$line, each line gives four integers $$l ', R', p ', K' $$. For these four values, you should use the following method to get the real $$l, R, P, K $$:
$$L = L' \oplus X$$
$$R = R' \oplus X$$
$$p = p' \oplus X$$
$$K = K' \oplus X$$
$$x $$represents the answer of the previous query. If it is the first query, the value of $$x $$is $$0 $.
$$(1 \leq L < R \leq n,1 \leq p \leq 10^6,1 \leq K \leq 169,R-L+1 \geq K)$$
###Output format:
For each query, output the answer.
###Input example:
```in
one
5 2
31 2 5 45 4
1 5 5 1
2 5 3 2
```
###Output example:
```out
0
one
```
answer:If there is no answer, please comment
For each query, you will be given an interval $$[l, R] $$and two integers $$p $$and $$k $$. Your task is to find $$p $$and $$a_ L,a_{ L+1},a_{ L+2},......,a_ The nearest distance between R and K.
$$p $$and $$a_ The distance between I $$is $$| p - A_ i|$$。
For example:
$$A=$$ { $$31,2,5,45,4$$ }, $$L = 2,R = 5,p = 3,K = 2$$
$$|p - a_ 2| = 1,|p - a_ 3| = 2,|p - a_ 4| = 42,|p-a_ 5|=1$$
The sorted distance is {$$1,1,2,42 $$}.
So the shortest distance of $$2 $$is $$1 $.
###Input format:
In the first line, enter a $$t (1 / Leq T / Leq 3) $$to represent the number of test data groups.
For each group of test data:
The first line gives two integers, $$n $$and $$m, (1 / Leq n, M / Leq 10 ^ 5) $$, representing the length of the array and the number of queries.
The second line contains $$n $$spaces separated integers $$a_ 1,a_ 2,a_ 3,......,a_ n(1 \leq a_ I / Leq 10 ^ 6) $$, to ensure that the array elements are not repeated
Next, $$M $$line, each line gives four integers $$l ', R', p ', K' $$. For these four values, you should use the following method to get the real $$l, R, P, K $$:
$$L = L' \oplus X$$
$$R = R' \oplus X$$
$$p = p' \oplus X$$
$$K = K' \oplus X$$
$$x $$represents the answer of the previous query. If it is the first query, the value of $$x $$is $$0 $.
$$(1 \leq L < R \leq n,1 \leq p \leq 10^6,1 \leq K \leq 169,R-L+1 \geq K)$$
###Output format:
For each query, output the answer.
###Input example:
```in
one
5 2
31 2 5 45 4
1 5 5 1
2 5 3 2
```
###Output example:
```out
0
one
```
answer:If there is no answer, please comment