[BOJ] Game Addiction / silver 2 / 60분#71
Merged
Conversation
가장 긴 증가하는 부분 수열이라는 알고리즘을 사용하는 문제인 것을 발견하고 가장 긴 증가하는 부분 수열에 관련된 문제를 풀면서 공부했고 그 내용을 기반으로 문제를 해결해 나갔습니다. dp배열은 2중 반복문을 사용했고 반복문을 진행하면서 조건을 걸어서 조건에 맞는 길이만큼 DP에 저장하는 방식으로 문제를 풀었습니다 (시간은 다른 알고리즘을 공부하는 시간까지 포함시켰습니다)
이전에는 주영님이 제출하신 코드를 참고하며 공부한 뒤, 그 내용을 바탕으로 문제를 풀었습니다. 주영님이 사용하신 방식(DP 접근법)을 기반으로 하니 훨씬 쉽게 해결할 수 있었습니다. 이 코드는 위와 왼쪽 방향의 값을 누적해서 더해 나가며 목표 좌표에 도달하면 탐색을 멈추고, 그 지점의 값을 최종 결과로 출력하는 방식입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
이전에는 주영님이 제출하신 코드를 참고하며 공부한 뒤, 그 내용을 바탕으로 문제를 풀었습니다. 주영님이 사용하신 방식(DP 접근법)을 기반으로 하니 훨씬 쉽게 해결할 수 있었습니다.
이 코드는 위와 왼쪽 방향의 값을 누적해서 더해 나가며 목표 좌표에 도달하면 탐색을 멈추고, 그 지점의 값을 최종 결과로 출력하는 방식입니다.