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
For each year, over the course of
Your task is to print out the number of children who receive coal for each year on separate lines.
Constraints
Subtask 1 [30%]
Subtask 2 [50%]
Subtask 3 [20%]
No additional constraints.
Input Specification
The first line of input contains
The next line contains
The next line consists of
Output Specification
For each year from
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.
Comments