atcoder#ABC281E. [ABC281E] Least Elements
[ABC281E] Least Elements
Score : points
Problem Statement
You are given an integer sequence of length , and integers and . For each , solve the following independent problem.
Find the sum of the first values in the sorted list of the integers in ascending order.
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Let be the answer to the problem for , and print them in the following format:
6 4 3
3 1 4 1 5 9
5 6 10
- For , sorting in ascending order yields , where the sum of the first three values is .
- For , sorting in ascending order yields , where the sum of the first three values is .
- For , sorting in ascending order yields , where the sum of the first three values is .
10 6 3
12 2 17 11 19 8 4 3 6 20
21 14 15 13 13