Skip to content

Commit 6a169f4

Browse files
authored
Update 8.py
1 parent 617df1e commit 6a169f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

โ€Ž10/8.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ def union_parent(parent, a, b):
1414
else:
1515
parent[a] = b
1616

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

2121
# ๋ชจ๋“  ๊ฐ„์„ ์„ ๋‹ด์„ ๋ฆฌ์ŠคํŠธ์™€, ์ตœ์ข… ๋น„์šฉ์„ ๋‹ด์„ ๋ณ€์ˆ˜
2222
edges = []
@@ -26,7 +26,7 @@ def union_parent(parent, a, b):
2626
for i in range(1, v + 1):
2727
parent[i] = i
2828

29-
# ๋ชจ๋“  ๊ฐ„์„ ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์ž…๋ ฅ ๋ฐ›๊ธฐ
29+
# ๋ชจ๋“  ๊ฐ„์„ ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ์ž…๋ ฅ๋ฐ›๊ธฐ
3030
for _ in range(e):
3131
a, b, cost = map(int, input().split())
3232
# ๋น„์šฉ์ˆœ์œผ๋กœ ์ •๋ ฌํ•˜๊ธฐ ์œ„ํ•ด์„œ ํŠœํ”Œ์˜ ์ฒซ ๋ฒˆ์งธ ์›์†Œ๋ฅผ ๋น„์šฉ์œผ๋กœ ์„ค์ •

0 commit comments

Comments
ย (0)