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/11873
🧭 풀이 시간
20분
👀 체감 난이도
✏️ 문제 설명
0과 1로 이루어진 N*M 격자에서 1로만 구성된 부분 직사각형의 최대 넓이를 구해보자.
🔍 풀이 방법
1행만 존재하는 경우의 최대 부분 직사각형
2행까지 존재하는 경우의 최대 부분 직사각형
...
N행까지 존재하는 경우의 최대 부분 직사각형
각 문제는 히스토그램에서 가장 큰 직사각형의 넓이를 구하는 문제와 동일해진다.
i행까지 존재하는 경우에 대한 히스토그램 모양은 누적 합을 이용해 1차원 배열로 나타낼 수 있다.
차례대로 구해서 그중 최댓값을 구해줬다.
⏳ 회고
재활