백준 2644 java
-
boj)2644 - 촌수계산PS/boj 2020. 9. 5. 16:40
import java.io.*; import java.util.*; public class Main { static int N, M, person1, person2, x, y; static LinkedList[] nodeList; static boolean[] visited; static boolean check; static class Node { int index; int distance; public Node(int index, int distance) { this.index = index; this.distance = distance; } } public static void bfs(int start, int end) { Queue q = new LinkedList(); q.offer(new No..