{"raw_statement":[{"iden":"problem statement","content":"You are given a sequence of $N$ positive integers: $A = (A_1, A_2, \\dots, A_N)$, and $Q$ queries.\nIn the $i$\\-th query $(1 \\leq i \\leq Q)$, given a positive integer $K_i$, find the $K_i$\\-th smallest integer among the positive integers that differ from all of $A_1, A_2, \\dots, A_N$."},{"iden":"constraints","content":"*   $1 \\leq N, Q \\leq 10^5$\n*   $1 \\leq A_1 < A_2 < \\dots < A_N \\leq 10^{18}$\n*   $1 \\leq K_i \\leq 10^{18}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $Q$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n$K_1$\n$K_2$\n$\\vdots$\n$K_Q$"},{"iden":"sample input 1","content":"4 3\n3 5 6 7\n2\n5\n3"},{"iden":"sample output 1","content":"2\n9\n4\n\nThe positive integers that differ from all of $A_1, A_2, \\dots, A_N$ are $1, 2, 4, 8, 9, 10, 11, \\dots$ in ascending order. The second, fifth, and third smallest of them are $2$, $9$, and $4$, respectively."},{"iden":"sample input 2","content":"5 2\n1 2 3 4 5\n1\n10"},{"iden":"sample output 2","content":"6\n15"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}