#abc255d. [abc255_d]±1 Operation 2

[abc255_d]±1 Operation 2

Problem Statement

You are given a sequence of length NN: A=(A1,A2,dots,AN)A=(A_1,A_2,\\dots,A_N). The following action on this sequence is called an operation.

  • First, choose an integer ii such that 1leileN1 \\le i \\le N.
  • Next, choose and do one of the following.
    • Add 11 to AiA_i.
    • Subtract 11 from AiA_i.

Answer QQ questions.
The ii-th question is the following.

  • Consider performing zero or more operations to change every element of AA to XiX_i. Find the minimum number of operations required to do so.

Constraints

  • All values in input are integers.
  • 1leN,Qle2times1051 \\le N,Q \\le 2 \\times 10^5
  • 0leAile1090 \\le A_i \\le 10^9
  • 0leXile1090 \\le X_i \\le 10^9

Input

Input is given from Standard Input in the following format:

NN QQ A1A_1 A2A_2 dots\\dots ANA_N X1X_1 X2X_2 vdots\\vdots XQX_Q

Output

Print QQ lines.
The ii-th line should contain the answer to the ii-th question as an integer.


Sample Input 1

5 3
6 11 2 5 5
5
20
0

Sample Output 1

10
71
29

We have A=(6,11,2,5,5)A=(6,11,2,5,5) and three questions in this input.

For the 11-st question, you can change every element of AA to 55 in 1010 operations as follows.

  • Subtract 11 from A1A_1.
  • Subtract 11 from A2A_2 six times.
  • Add 11 to A3A_3 three times.

It is impossible to change every element of AA to 55 in 99 or fewer operations.

For the 22-nd question, you can change every element of AA to 2020 in 7171 operations.

For the 33-rd question, you can change every element of AA to 00 in 2929 operations.


Sample Input 2

10 5
1000000000 314159265 271828182 141421356 161803398 0 777777777 255255255 536870912 998244353
555555555
321654987
1000000000
789456123
0

Sample Output 2

3316905982
2811735560
5542639502
4275864946
4457360498

The output may not fit into 3232-bit integers.