트리1 백준 11725 트리의 부모 찾기 / JAVA https://www.acmicpc.net/problem/11725 11725번: 트리의 부모 찾기 루트 없는 트리가 주어진다. 이때, 트리의 루트를 1이라고 정했을 때, 각 노드의 부모를 구하는 프로그램을 작성하시오. www.acmicpc.net > 풀이(DFS) /* * 백준 11725 트리의 부모찾기 * #실버2 * #DFS */ public class boj_11725 { static ArrayList[] list; static boolean[] visited; static int[] answer; public static void main(String[] args) throws IOException { // TODO Auto-generated method stub BufferedReader br.. PS/BOJ 2023. 5. 23. 이전 1 다음