1260번
-
boj)1260 - DFS와 BFSPS/boj 2020. 9. 3. 12:25
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { static int n, m, v; static LinkedList[] nodeList; static boolean[] checked = new boolean[1001]; static boolean[] checked2 = new boolean[1001]; public static void dfs(int node) { if (checked[node]) return; checked[node] = true; System.out.print(node + " "); for (int..