[20250723] BOJ / P4 / 직사각형 만들기 / 권혁준 #529
Merged
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/1801
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
N개의 막대를 적절히 사용해서 만들어지는 직사각형들 중 그 넓이의 최댓값을 구해보자.
🔍 풀이 방법
직사각형에는 4개의 선분이 필요하다.
-> dp[a][b][c][d] = 각 막대의 길이가 a, b, c, d인 경우가 가능한가?
dp 테이블을 정의하기 위한 상한은 대략 s = (전체 막대의 합 / 2)라고 하면, s^4의 크기로(dp[s][s][s][s]) 잡으면 된다.
⏳ 회고
배고파요