13451345 SUSTech Online Judge
Problem 1345 --[Easy] Accept

1345: [Easy] Accept

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 876  Solved: 248
[Submit][Status][Web Board]


CC is an energetic student in the computer science department. She is taking DSAA courses in this semester, so she has to work hard.

There are \(T\) labs totally, and each lab contains \(N\) problems. No matter for which lab, the \(i\)-th problem always has a difficulty value of \(d_i\) (so working on this problem costs \(d_i\) energy). Since the easier problems are always placed ahead of the more difficult ones, we have \(d_i\leq d_{i+1}\) for any \(1\leq i<n\).

CC wants to show off her skills of writing codes to her classmates, so in each lab she will only choose one problem to solve. Yeah, she does not care about the scores and GPA! In detail, she will choose the most difficult problem which have a difficulty value less than or equal to her current energy value. If it happens that there is a problem with exactly the same difficulty value as her current energy value, she will happily AC the problem and shout "Accept". Otherwise, she will tell you how many energy left (which is the current energy value minus the difficulty of the problem she finishes). It's guaranteed that her current energy value can afford to do the easiest problem.

However, CC may have different energy values in different labs. So she wants to know what will happen in each lab.


The first line contains two integers \(N (1\leq N\leq 10^5), T(1\leq T\leq 10^5)\), indicating the number of problems in each lab and the number of labs.

The second line contains \(N\) integers \(d_1, d_2, ... d_N (1\leq d_i\leq 10^9)\), indicating the difficulty values of the problems.

The third line contains \(T\) integers \(e_1, e_2, ... e_T (1\leq e_i\leq 10^9)\), indicating the energy value of CC in each lab.


For each lab, output what CC said in one line.

Sample Input

10 3
1 1 2 3 5 8 9 12 13 16
9 6 13

Sample Output