백준 14889

백준 14889 스타트와 링크(Java)
https://www.acmicpc.net/problem/14889 14889번: 스타트와 링크 예제 2의 경우에 (1, 3, 6), (2, 4, 5)로 팀을 나누면 되고, 예제 3의 경우에는 (1, 2, 4, 5), (3, 6, 7, 8)로 팀을 나누면 된다. www.acmicpc.net Java 코드 import java.util.Scanner; public class Main { static int n; static int[][] arr = new int[21][21]; static boolean visit[] = new boolean[21]; static int min = Integer.MAX_VALUE; public static void dfs(int s, int num) { if(num == ..