#P7816. Set2
Set2
Set2
Problem Description
You are given a set . You have to do the following operations until there are no more than elements left in the : Firstly, delete the smallest element of , and then randomly delete another elements one by one from the elements left in in equal probability. Note that the order of another deleted elements matters. That is to say, you delete after or delete after , which are different ways. For each , determine the probability of being left in the . It can be shown that the answers can be represented by , where and are coprime integers, and print the value of .
Input
The first line contains the only integer denoting the number of test cases. For each test case: The first line contains two integers and . It guarantees that: $n \in [1,5000] ,\ \sum n \in [1,3 \times 10^4],\ k \in [1,5000].$
Output
For each test case, you should output integers, the -th of them means the probability of being left in the .
Sample Input
1
5 2
Sample Output
0 499122177 499122177 499122177 499122177
Source
2020 Multi-University Training Contest 5