kex

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

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

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

You must find kex(A,k_i)\mathrm{kex}(A, k\_i) for the given set of integers AA and qq values of k_ik\_i.

입력

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

In second line of input contains nn different not negative integers, each of which is at most 10910^9, --- elements of AA.

In third line of input contains qq integers k_ik\_i (1k_i1091\leq k\_i \leq 10^9).

출력

Print values: kex(A,k_1),kex(A,k_2),,kex(A,k_q)\mathrm{kex}(A, k\_1), \mathrm{kex}(A, k\_2),\ldots, \mathrm{kex}(A,k\_q).