Files
PS/boj/15665.py
Gyubin Han 2600340c03 first commit
from old repository to a new repository
2024-04-30 16:59:10 +09:00

20 lines
289 B
Python

n,m=map(int,input().split())
inarr=sorted(list(map(int,input().split())))
arr=[]
def bt():
if len(arr)==m:
print(*arr)
return
l=0
for i in inarr:
if i==l:
continue
arr.append(i)
bt()
arr.pop()
l=i
bt()