#GYM104678C. Storybooks
Storybooks
Description
You work for a publishing house. Recently you have received $n$ stories from different authors. The $i$th story has a length of $a_i$ pages. In the near future you have planned to publish $k$ books, $i$-th book contains $b_i$ pages. Each book can contain any number of different available stories. Each story can be published in any number of books, just like in none of them. For each book, determine the maximum number of stories that it can contain.
The first line contains two space-separated numbers $n$ and $k$ ($1 \leq n,k \leq 200000$). The second line contains $n$ space-separated numbers $a_i$ $(1 \leq a_i \leq 10^9)$. The third line contains $k$ space-separated numbers $b_i$ $(1 \leq b_i \leq 10^{18})$.
Print $k$ space-separated numbers - the maximum number of stories for each book.
Input
The first line contains two space-separated numbers $n$ and $k$ ($1 \leq n,k \leq 200000$). The second line contains $n$ space-separated numbers $a_i$ $(1 \leq a_i \leq 10^9)$. The third line contains $k$ space-separated numbers $b_i$ $(1 \leq b_i \leq 10^{18})$.
Output
Print $k$ space-separated numbers - the maximum number of stories for each book.
4 3
8 2 3 30
5 29 1
2 3 0