- Time limit: 1.00 s
- Memory limit: 512 MB
You are given an array of integers. Consider the sums of all subsets of the given array with exactly elements.
Your task is to find the smallest subset sums.
Input
The first line has three integers , and : the size of the array, the size of the subsets and the number of subset sums .
The next line has integers : the contents of the array.
Output
Print integers: the smallest subset sums in increasing order.
Constraints
Example
Input:
5 3 9 -3 1 5 2 0
Output:
-2 -1 0 2 3 3 4 6 7