링크🔗https://www.acmicpc.net/problem/11724🗒️파이썬 코드 풀이 (DFS)import syssys.setrecursionlimit(10**6)input = sys.stdin.readlinedef dfs(graph,i,visited): visited[i] = True for v in graph[i]: if not (visited[v]): dfs(graph,v,visited)N, M = map(int, input().split())graph = [[] for _ in range(N + 1)]visited = [0] * (N + 1)for _ in range(M): u, v = map(int, input().split()) ..