AT_abc440_e [ABC440E] Cookies
Description
There are $ 10^{100} $ cookies of each of $ N $ types. The deliciousness per cookie of the $ i $ -th type is $ A_i $ .
You will choose a total of $ K $ cookies from these. Two ways of choosing cookies are considered the same if and only if the multisets of types of chosen cookies match.
For each of the $ \binom{N+K-1}{K} $ ways of choosing, consider the sum of deliciousness of the chosen cookies. Let $ S_1,S_2,\dots $ be these sums in descending order, with duplicates included. Find $ S_1,\dots,S_X $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ K $ $ X $ $ A_1 $ $ \dots $ $ A_N $
Output Format
Let $ S_1,S_2,\dots $ be the possible sums of deliciousness of the chosen $ K $ cookies in descending order, with duplicates included. Output $ S_1,\dots,S_X $ in this order, separated by newlines.
Explanation/Hint
### Sample Explanation 1
There are $ 5 $ ways to choose $ 4 $ cookies: " $ k $ cookies of type $ 1 $ and $ 4-k $ cookies of type $ 2 $ " $ (0\leq k \leq 4) $ , where the sums of deliciousness of the chosen cookies are $ 80,70,60,50,40 $ .
### Sample Explanation 2
Different ways of choosing cookies may result in the same sum of deliciousness.
### Constraints
- $ 1\leq N \leq 50 $
- $ 1 \leq K \leq 10^5 $
- $ 1 \leq X \leq \min\left(10^5, \binom{N+K-1}{K}\right) $
- $ -10^9 \leq A_i \leq 10^9 $
- All input values are integers.