| Author: | Pavel Mesenev | Time limit: | 2 sec | |
| Input file: | Standard input | Memory limit: | 256 Mb | |
| Output file: | Standard output |
You are given an array of n integers a0, a1, …, an − 1 and q queries. Each query is an integer x; answer with the number of array elements that are strictly less than x.
The first line contains two integers n and q. The second line contains n integers a0… an − 1. The third line contains q integers — the queries.
Print q lines; line j is the answer to the j-th query.
1 ≤ n ≤ 105
1 ≤ q ≤ 105
− 109 ≤ ai ≤ 109, − 109 ≤ x ≤ 109
| No. | Standard input | Standard output |
|---|---|---|
| 1 |
|
|
| 2 |
|
|
| 3 |
|
|