## GFSS Christmas Challenge P4 - Coal Counting

View as PDF

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 256M

Authors:
Problem type

Santa is known for giving presents to all the well-behaved children. However, he is also known for giving coal to the naughty ones. Santa has managed to create a system that quantifies a child's naughtiness. For each of the children he visits, he assigns them a naughtiness value .

For each year, over the course of years, Santa's boss (his wife), gives him an integer representing the naughty threshold for the -th year. Each kid with a naughtiness value greater than or equal to the naughty threshold for that year will be given a piece of coal.

Your task is to print out the number of children who receive coal for each year on separate lines.

#### Input Specification

The first line of input contains and .

The next line contains space separated integers, the -th of which representing .

The next line consists of space separated integers, the -th of which representing .

#### Output Specification

For each year from to , print the number of children who receive coal, each on its own line.

#### Sample Input

4 2
5 8 2 3
4 3

#### Sample Output

2
3

#### Explanation

In year 1, Santa gives coal to children 1 and 2. In year 2, Santa gives coal to children 1, 2 and 4.