N, M = map(int, input().split())
ls = []
def dfs(cnt, idx):
if cnt -1 == M:
print(' '.join(map(str,ls)))
return
for i in range(idx, N+1):
ls.append(i)
dfs(cnt+1, i)
ls.pop()
dfs(1,1)
'Coding Test > BAEKJOON' 카테고리의 다른 글
1924 (0) | 2023.02.21 |
---|---|
8958 (0) | 2023.02.21 |
2164 (0) | 2023.02.21 |
6550/14584 (0) | 2023.02.12 |
입출력 정리 (0) | 2023.02.12 |