1. BOJ 2644 촌수계산 https://www.acmicpc.net/problem/2644 코드 from collections import deque import sys input = sys.stdin.readline N = int(input()) start, end = map(int, input().split()) m = int(input()) tree = [[] for _ in range(N+1)] for i in range(m): x, y = map(int, input().split()) tree[y].append(x) tree[x].append(y) visited = [False]*(N+1) cnt = [0]*(N+1) queue = deque([start]) while queue: v = ..