#BS0000005. Thức uống thú vị (Interesting drink)
Thức uống thú vị (Interesting drink)
Interesting drink
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
There are shops. A bottle costs coins in shop .
For each of days, you have at most coins. Determine how many shops sell a bottle for a price not greater than .
Input
The first line contains .
The second line contains .
The third line contains .
Each of the next lines contains one value .
Output
For each day, print the number of shops with .
Subtasks
- Subtask 1 — 20%: .
- Subtask 2 — 30%: .
- Subtask 3 — 50%: , , .
Examples
Input
5
3 10 8 6 11
4
1
10
3
11
Output
0
4
1
5
Explanation
For , exactly four shop prices are at most : .