문제 https://www.acmicpc.net/problem/24480 24480번: 알고리즘 수업 - 깊이 우선 탐색 2 첫째 줄에 정점의 수 N (5 ≤ N ≤ 100,000), 간선의 수 M (1 ≤ M ≤ 200,000), 시작 정점 R (1 ≤ R ≤ N)이 주어진다. 다음 M개 줄에 간선 정보 u v가 주어지며 정점 u와 정점 v의 가중치 1인 양 www.acmicpc.net 코드 import sys input = sys.stdin.readline sys.setrecursionlimit(10**9) n, m, r = map(int,input().split()) graph = [[] for _ in range(n+1)] visited = [0] * (n+1) cnt = 1 def dfs(gra..