백준 1761번 (1) 썸네일형 리스트형 백준 1761번(JAVA) - 정점들의 거리 import java.util.*; import java.io.*; class Node { int v; int w; Node(int v, int w) { this.v=v; this.w=w; } } public class Main { public static ArrayList[] arr; public static int N; public static int[] Depth; // 깊이 public static int[][] parent;// parent[0][3] 은 3번 노드의 2의0승 부모, //parent[5][3]은 3번 노드의 2의 5승부모, 즉 32번째 부모 public static int[][] length;// length[5][3] 은 3번 노드부터 2의0승 부모까지의 길이 public st.. 이전 1 다음