Skip to content

Commit 2c23ded

Browse files
committed
117차 2번 문제풀이(푸는중)
1 parent 0166c1e commit 2c23ded

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import sys
2+
from collections import *
3+
4+
input = sys.stdin.readline
5+
6+
graph = defaultdict(list)
7+
n = int(input())
8+
for _ in range(n-1):
9+
u, v = map(int, input().split())
10+
graph[u].append(v)
11+
12+
13+
# def parent(x):
14+
# x_root = set()
15+
# while x in graph[x]:
16+
# x_root.add(x)
17+
# x = graph[x]
18+
# x_root.add(x)
19+
20+
21+
# parent(2)

0 commit comments

Comments
 (0)