-
백준(BaekJoon)_15656_N과M(6)Algorithm/Problems_Solving 2022. 8. 27. 11:12
n,m = map(int, input().split()) num_list = list(map(int, input().split())) result = [] def func(start): if m == len(result): print(" ".join(map(str, result))) else: num_list.sort() for i in range(start, n): if num_list[i] not in result: result.append(num_list[i]) func(i) result.pop() func(0)
'Algorithm > Problems_Solving' 카테고리의 다른 글
백준(BaekJoon)_15657_N과 M(8) (0) 2022.08.27 백준(BaekJoon)_15656_N과 M(7) (0) 2022.08.27 백준(BaekJoon)_15654_N과M(5) (0) 2022.08.23 백준(BaekJoon)_15652_N과M(4) (0) 2022.08.23 백준(BaekJoon)_15651_N과M(3) (0) 2022.08.21