풀이 "백준 15664, N과 M (10)"에서 기존에 i번째 요소를 사용했는지를 확인하기 위해 사용한 check를 빼면 해결할 수 있다. 소스코드 #include #include int N, M, arr[8], visited[8]; int compare(const void *a, const void *b){ return *(int*)a - *(int*)b; } void BT(int depth, int start){ for (int i = start, temp = 0; i < N; i++) if (temp != arr[i]){ temp = visited[depth] = arr[i]; if (depth + 1 == M){ for (int idx = 0; idx < M; idx++) printf("%d ",..