| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 | 512 MB | 243 | 89 | 68 | 44.737% |
Given a multiset of integers $A = \{a_1, a_2, \dots, a_n\},ドル print the least $k$ sums among all non-empty subsets in sorted order.
The first line contains 2ドル$ integers $n, k$ (1ドル \leq n \leq 200000, 1 \leq k \leq \min\{2^n - 1, 200000\}$).
The second line contains $n$ integers $a_1, a_2, \dots, a_n$ ($|a_i| \leq 10^9$).
$k$ integers denote the least $k$ sums.
2 3 -1 1
-1 0 1
3 7 -1 0 1
-1 -1 0 0 0 1 1