A. balloon
题号:NC229640
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Xiaoxiang has children and balloons.

After class this day, my friends are going to grab these balloons. Each balloon has a certain height on the wall. Only when the children jump up, the height that their hands can reach is greater than or equal to the height of the balloon, and the children can pick up the balloon.

For the sake of fairness, the teacher asked the children who jumped low to pick them first, and the children who jumped high to pick them later.

Children are very greedy, and every child will take off all the balloons he can pick when picking balloons.

Coincidentally, the children can reach different heights when they jump up, so that there will be no disputes among children with the same height after jumping up.

输入描述:

The first line contains two integers , which respectively represent the number of children and  the number of balloons.
The second line contains   positive integers .
The third line contains positive integers
     

输出描述:

Output a total of  lines, each line is an integer, where the  line indicates the number of balloons picked by the  th child.
示例1

输入

复制
5 6
3 7 9 6 4
1 2 3 4 5 6

输出

复制
3
0
0
2
1
示例2

输入

复制
10 10
1 2 3 4 5 6 7 8 9 10
3 1 4 6 7 8 9 9 4 12

输出

复制
1
0
1
2
0
1
1
1
2
0