Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π λ¬Έμ λ§ν¬
2468λ² μμ μμ
βοΈ μμλ μκ°
30λΆ
β¨ μλ μ½λ
μ΄λ€ μ§μμ λ¬Όμ μ κΈ°μ§ μμ μμ ν μμμ μ΅λκ°μ ꡬνλ bfs λ¬Έμ μμ΅λλ€. μμ ν μΉΈμ κ°μλ₯Ό ꡬνλ κ²μ΄ μλλΌ λν μ΄λ‘ λ¬Όμ μ κΈ°μ§ μλ μ§μ λ€μ΄ μ, μλ, μ€λ₯Έμͺ½, μΌμͺ½μΌλ‘ μΈμ ν΄ μλ μμμ κ°μλ₯Ό ꡬνλ λ¬Έμ μμ΅λλ€. λ°±μ€μΌλ‘ 보면 μ¬μ κ°μλ₯Ό ꡬνλ λ¬Έμ μ ν‘μ¬ν κ² κ°μ΅λλ€.
κ³ λ €ν μ
μλ₯Ό λ€μ΄, λ€μκ³Ό κ°μ΄ λμ΄κ° 4 μ΄νμΈ λͺ¨λ μ§μ μ΄ λ¬Όμ μ κ²Όλ€λ©΄
μ΄λ κ² μμ μμμ΄ 5κ°κ° λλ€.
μμ
π μλ‘κ² μκ²λ λ΄μ©
νμ΄μ¬μμ 2μ°¨μ 리μ€νΈμμ κ°μ₯ ν° κ°μ ꡬν λλ max(map(max, board)) μ΄λ° μμΌλ‘ ννν μ μμμ μκ² λμμ΅λλ€.