-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6-yuyu0830 #26
6-yuyu0830 #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
λ¨μ μ¬μλ§ κ΅¬λΆν΄μ£Όλ©΄ κ·Έ νλ‘ λ¨μ MSTλΌμ μ°μ μμνμ κ°κΉμ΄ λ
Έλλ€μ μ΄μ΄μ£Όλ©΄ λμ΄λ€μ©!
μ΄μ°λ³΄λ©΄ MSTλ 쑰건λ€λ§ λ§μ‘±νλ©΄ κ°μ₯ λ¨μν λ¬Έμ κ° μλκΉμ?
μ¬μ€ μ λ ₯ λ°μ λ μ²λ¦¬λ§ νκ³ λλ MSTλ λ€λ₯Όκ² νλλ μμμ΄μ... κ·Έλ° μλ―Έμμλ κΏλ¬Έμ κ° μλμμκΉμ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ λ ₯λΆν° κ°μ μ±λ³μ΄λ©΄ κ±Έλ¬μ£Όκ³ κ·Έ νμ λκ°μ΄ ν¬λ£¨μ€μΉΌλ‘ μ§ννλ©΄ λλ λ¬Έμ μλ€μ©. λ§μ½ μ κ±°λ₯΄κ³ νλ€λ©΄ λΉκ΅ν λλ§λ€ μλ‘ λ€λ₯Έ μ±λ³μΈμ§ νμΈν΄μΌνλκΉ νμ€ν λ μ’μ ν΄κ²°λ²μ΄μλ€λ μκ°μ΄ λλλ€. μ λ΄€μ΅λλ€ γ γ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ²μμ
λ ₯ λ°μλλΆν° manonly λ°°μ΄
μ ν΅ν΄ λ¨μλ 1
λ‘ μ€μ ν΄μ£Όλ©° λ¨μ-μ¬μ
μΌ κ²½μ°λ§ 벑ν°μ λ£μ΄μ£Όλκ΅°μ μ κ°μΌλ©΄ λμ€μ νμκ³Όμ
μμ κ±Έλ¬λμκ±° κ°μλ° μ κΈ°νλ€μ..
κ·Έλ¦¬κ³ κ΅¬μ‘°μ²΄
νμ©μ λν΄μλ μ λ°°μκ°λλ€..!
π λ¬Έμ λ§ν¬
λλ§ μλλ μ°μ (14621)
βοΈ μμλ μκ°
1μκ° λ°
β¨ μλ μ½λ
μ΅μ μ μ₯ νΈλ¦¬λ₯Ό μ¬μ©νλ λ¬Έμ μ λλ€.
μ‘°κΈ λ€λ₯Έ μ μ΄ μλ€λ©΄ μ μ μΌλ‘ μ 곡λλ 'λνκ΅' κ° 'μ¬μ΄ λνκ΅'μ 'λ¨μ΄ λνκ΅' λ‘ λλκ³ , ν νκ΅μμ λ€λ₯Έ νκ΅λ‘ κ° λ μλ‘ μλ°λ νκ΅λ‘λ§ κ° μ μμ΅λλ€.
μ°μ λ¬Έμ μ ν΄κ²°μ
Kruskal μκ³ λ¦¬μ¦
μ μ¬μ©νμ΅λλ€. οΏ½λͺ¨λ μ μ μ λ°©λ¬Ένλ μ΅μ 거리λ₯Ό ꡬν λ, κ°μ μ κΈΈμ΄ κΈ°μ€μΌλ‘ μ λ ¬ν΄ μ§§μ κ°μ λΆν° νλμ© μ μ©νλ©° μ΅μ 거리λ₯Ό ꡬν©λλ€.μ΄ λ, 무μμ μ μ©νλκ² μλ 'μ¬μ΄ν΄μ΄ μκΈ°λμ§ μ²΄ν¬' νλ©° νμν΄μΌ ν©λλ€. μ¬μ΄ν΄μ
Union-Find μκ³ λ¦¬μ¦
μ ν΅ν΄ 체ν¬ν μ μμ΅λλ€.νμ§λ§ μ΄λ² λ¬Έμ λ 'μ¬μ΄ λνκ΅' μ 'λ¨μ΄ λνκ΅' λ¬Έμ κ° μκΉλλ€. κ·Έλμ μ²μμλ μ μ λΌλ¦¬ Union λΉκ΅λ₯Ό ν λ λ¨μ΄ μ¬μ΄ μ¬λΆλ₯Ό νμΈνλ € νμ΅λλ€. κ·Έλ°λ° ꡬννλ€ λ³΄λ μ λ ₯μ λ°μ λ λΆν° κ±Έλ¬λΈλ€λ©΄ μ€ν μκ°μ μ€μΌ μ μκ² κ΅¬λ μΆμ΄
manOnly
λ°°μ΄μ ν΅ν΄ μ λ ₯ λ°λ μμ μμ ν΄κ²°νμ΅λλ€.π μλ‘κ² μκ²λ λ΄μ©
μ΅μ μ μ₯ νΈλ¦¬κ° μ΄λ»κ² ꡬνλκ³ , kruskal μκ³ λ¦¬μ¦μ μ΄λ»κ² μ¬μ©νλμ§ κ³΅λΆνμ΅λλ€. Union-Find μ¬λ°λ€μ γ γ