728x90
15650
-
[백준-15650] N과 M(2) - Java공부/백준 2022. 5. 30. 19:59
코드 import java.util.*; public class back15650 { public static int[] arr; public static int N,M; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); N = scanner.nextInt(); M = scanner.nextInt(); arr = new int[M]; dfs(1,0); } public static void dfs(int at, int depth) { if (depth == M) { for (int val : arr) { System.out.print(val + " "); } System.out.println(); return..