| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 (추가 시간 없음) | 1024 MB | 70 | 50 | 43 | 74.138% |
Gry finally becomes the Executive Courier Officer in "Universe Express". He has $n$ subordinate couriers with some delivery strength $f_i$. The delivery strength of a team of three people is the median of their strength, i.e., the middle element after the sorting. Please help Gry to split the couriers into $k$ teams of three people in order to maximize the total delivery strength of "Universe Express". The total strength is the sum of the strength of these $k$ teams.
The sole line of the output should contain the maximal strength of "Universe Express".
3 1 2 3
2
6 5 6 2 3 1 4
8