restructure zeta/** to storage/zeta/**

This commit is contained in:
2025-05-10 21:54:24 +09:00
parent 2886820691
commit 2f2e0759fd
407 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
N, M = map(int, input().split())
trace = [(sorted(list(map(int, input().split()))), M, [])]
while trace:
n, m, d = trace.pop()
for i in range(len(n) - 1, -1, -1):
trace.append((n[:i] + n[i + 1:], m - 1, d + [n[i]]))
if m == 0:
print(" ".join(map(str, d)))
# 아마도 백트래킹일거임 아마도 그럼 ㅇㅇ