시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 7 | 4 | 4 | 57.143% |
Distribute all non-empty subsets of {a, b, c, . . .} (first n lowercase English letters) of size at most k into as few groups as possible, subject to the following conditions:
The only line contains two integers n and k (1 ≤ k ≤ n ≤ 17).
Display the smallest number of groups g, followed by g group descriptions.
Group description i must consist of an integer si, followed by si subset descriptions. Each subset description must be a string containing subset elements in any order without spaces.
3 2
5 1 ab 1 ac 1 bc 1 b 2 c a
3 3
4 1 abc 2 ab c 2 ac b 2 bc a