#D0841. 静态第 k 小
静态第 k 小
Statement
Given an integer sequence A of length N, answer Q queries. Each query gives k; output the k-th smallest number in the whole sequence.
This is a template problem for the simplest form of overall binary search over the compressed value domain.
Input
N Q
A_1 A_2 ... A_N
k_1 k_2 ... k_Q
Output
Print Q lines, one answer per query.
Constraints
1 <= N,Q <= 2 * 10^5-10^9 <= A_i <= 10^91 <= k_i <= N