Big sorting
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given an array of integers. Sort it in ascending order.
Then answer queries: for each input value print .
Input
The first line contains the size of array and the number of queries .
The second line contains the array elements .
Each of the following lines contains a query: one integer .
Output
For each query print on a separate line: the -th number in the sorted array.
Examples
Sort the numbers in the given sample:
The answers to the queries are: .
Input #1
Answer #1
Submissions 319
Acceptance rate 50%