시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB42272573.529%

문제

Consider the set of non-negative integers $A$. The minimum non-negative integer that does not occur in this set is considered, for example, in game theory, and is denoted as $\mathrm{mex}(A)$. For example, $\mathrm{mex}(\{0, 1, 2, 4, 5, 9\})=3$.

Ann has decided to generalize the concept of mex. Consider a positive integer $k$ and a set of non-negative integer $A$. Denote as $\mathrm{kex}(A,k)$ a non-negative integer that is $k$-th in ascending order among all integers that are not in $A$. For example, $\mathrm{kex}(\{0, 1, 2, 4, 5, 9\}, 2)=6$.

You must find $\mathrm{kex}(A, k_i)$ for the given set of integers $A$ and $q$ values of $k_i$.

입력

The first line of input contains two integers $n$ and $q$ ($1 \leq n, q \leq 10^5$) --- number of elements in $A$ and number of $\mathrm{kex}$ numbers, that you have to find.

In second line of input contains $n$ different not negative integers, each of which is at most $10^9$, --- elements of $A$.

In third line of input contains $q$ integers $k_i$ ($1\leq k_i \leq 10^9$).

출력

Print values: $\mathrm{kex}(A, k_1), \mathrm{kex}(A, k_2),\ldots, \mathrm{kex}(A,k_q)$.

예제 입력 1

4 10
1 2 6 7
1 2 3 4 5 6 7 8 10 11

예제 출력 1

0 3 4 5 8 9 10 11 13 14