Merged
Conversation
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.
🧷 문제 링크
https://www.acmicpc.net/problem/14391
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
격자로 되어 있는 숫자 판을 겹치지 않게 자르려고 합니다.
자르는 것은 가로 또는 세로 일자로만 자를 수 있습니다.
가로로 자른 경우 왼쪽부터 세어 수가 되고, 세로로 자른 경우 위에서부터 아래로 수를 만듭니다.
각 조각들의 수를 모두 더했을 때 최댓값을 구하는 문제입니다.
🔍 풀이 방법
dfs를 이용해서 모든 지점들을 돌면서 최댓값을 갱신하는 방식으로 풀었습니다.
방문처리를 활용하였고, 각 계산이 끝나면 원상태로 돌려가면서 모든 경우의 수를 찾았습니다.
⏳ 회고
문제를 다 풀고 확인했는데 문제 유형이 비트마스킹이라고 되어 있어서 찾아봤는데
비트마스킹에 익숙해졌다면 어렵게 방문처리, 복구 하지 않고 풀 수 있었을 것 같습니다.
근데 현재는 비트마스킹이 익숙하지 않아서 공부해야할 것 같습니다.