예제 입력 1 3 1 예제 출력 1 1 2 3 예제 입력 2 4 2 예제 출력 2 1 2 1 3 1 4 2 3 2 4 3 4 예제 입력 3 4 4 예제 출력 3 1 2 3 4 #include constexpr int MAX_SIZE = 8; bool checked[MAX_SIZE]; int N, M; void go(int now, int cnt) { if (cnt == M) { for (int i = 0; i < N; i++) { if (checked[i]) printf("%d ", i + 1); } printf("\n"); return; } for (int i = now; i < N; i++) { if (checked[i]) continue; checked[i] = true; go(i + 1, cnt ..