문제: https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV7GOPPaAeMDFAXB T = int(input()) # 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다. def dfs(start, depth): global ans ans = max(ans, depth) for next in graph[start]: if visited[next]: continue visited[next] = True dfs(next, depth + 1) visited[next] = False for test_case in range(1, T + 1): N, M = map(int, input().split()) graph = [..