Jaber wants to play a game of $n$ levels numbered from $1$ to $n$. Jaber's probability of winning the $i^{th}$ level is $a_i\%$ $(1\leq a_i \leq 100)$. Jaber has $m$ friends numbered from $1$ to $m$ that will help him win this game, the $j^{th}$ friend can add $b_j\%$ to the probability of winning any level $(1\leq b_j \leq 100)$ to a maximum of $100\%$.
Jaber can choose which friend should help him in which level. So he asks you to help him by finding the optimal way of distributing his friends such that the probability of winning the entire game is as maximum as possible.
Note that each friend must be assigned to exactly one level and no two friends can be assigned the same level.
The first line contains two integers $n$ and $m$ $(1\leq m \leq n \leq 10^5)$ the number of levels and the number of friends.
The second line contains $n$ integers $a_1, a_2, ..., a_n$ $(1 \leq a_i \leq 100)$ where $a_i\%$ is Jaber's probability of winning the $i^{th}$ level.
The third line contains $m$ integers $b_1, b_2, ..., b_m$ $(1 \leq b_i \leq 100)$ where $b_i\%$ is the the amount the $i^{th}$ friend will add to the probability of winning the chosen level.
Print $m$ integers on a single line $c_1,c_2,...,c_m$ where $c_i$ is the number of the level which the $i^{th}$ friend will help Jaber in so that the probability of winning the games is maximum possible. If there are several answers, you can print any.
Input | Output |
---|---|
6 5 39 21 98 32 44 16 55 82 3 27 44 Copy
|
2 6 5 1 4 Copy
|
3 2 46 86 74 60 61 Copy
|
3 1 Copy
|