Skip to content

Commit 307e00c

Browse files
authored
Update 4.py
1 parent 60158cd commit 307e00c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

โ€Ž10/4.pyโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def union_parent(parent, a, b):
1616

1717
# ๋…ธ๋“œ์˜ ๊ฐœ์ˆ˜์™€ ๊ฐ„์„ (Union ์—ฐ์‚ฐ)์˜ ๊ฐœ์ˆ˜ ์ž…๋ ฅ ๋ฐ›๊ธฐ
1818
v, e = map(int, input().split())
19-
parent = {}
19+
parent = [0] * (v + 1) # ๋ถ€๋ชจ ํ…Œ์ด๋ธ” ์ดˆ๊ธฐํ™”ํ•˜๊ธฐ
2020

2121
# ๋ชจ๋“  ๊ฐ„์„ ์„ ๋‹ด์„ ๋ฆฌ์ŠคํŠธ์™€, ์ตœ์ข… ๋น„์šฉ์„ ๋‹ด์„ ๋ณ€์ˆ˜
2222
edges = []

0 commit comments

Comments
ย (0)