Skip to content

Conversation

@Ukj0ng
Copy link
Contributor

@Ukj0ng Ukj0ng commented Sep 8, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/11049

🧭 풀이 시간

90분

👀 체감 난이도

✏️ 문제 설명

행렬의 곱인데 연산의 수가 제일 적은 값은?

🔍 풀이 방법

dp[i][j]=i번째부터 j번째 행렬까지 곱하는 최소 연산 횟수
dp[i][j] = min(dp[i][k] + dp[k+1][j] + 연결비용)
(i ≤ k < j)
연결비용 = matrix[i].행 × matrix[k].열 × matrix[j].열

길이가 2인 것부터 N인 것까지 계산 -> 각 구간을 모든 k로 쪼개서 최소값 찾기

⏳ 회고

3중 for문을 구현하는거 너무 어렵다.

@ShinHeeEul ShinHeeEul merged commit 3a95222 into main Sep 8, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants