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.
π λ¬Έμ λ§ν¬
μ°μν©
βοΈ μμλ μκ°
1μκ°
β¨ μλ μ½λ
ν μ€νΈμΌμ΄μ€λ₯Ό 보면μ μ²μ μκ°νλ κ²μ
μ°μν©μ΄ μμκ° λμ¬ λκΉμ§ λν΄μ£Όκ³
λν λλ§λ€ μ΅λκ°μ κ°±μ νλ λ°©μμ μκ°νμλλ° κ·Έλ¬λ €λ©΄ κ²½μ°μ μκ° λ무 λ§μ΄ λ°μνλ€.ν΄κ²°
μΌμΌμ΄ λν κ°μ μ μ₯ν΄μ€ νμμμ΄ κ³μν΄μ κ°±μ νλ©΄ λλ€.
max(νμ¬ μμ, νμ¬μμ+μ΄μ μμ)
λ‘ λ°°μ΄μ κ°μ κ³μ κ°±μ ν΄μ€λ€. λ§μ§λ§μλ μλ‘ κ°±μ λ m리μ€νΈλ₯Όmaxλ₯Ό μ¨μ μ΅λκ°μ ꡬν΄μ€λ€.
π μλ‘κ² μκ²λ λ΄μ©
μ½λλ κ°λ¨νμ§λ§ λ©λͺ¨λΌμ΄μ§μ κ°μ§λ dpμ μ μλ¬Έμ μλ κ² κ°μ΅λλ€.