[프로그래머스] 최적의 행렬 곱셈(C++)

·
개발/알고리즘
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12942 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 코드 구현#include #include #include #include using namespace std;int solution(vector> matrix_sizes) { int n = matrix_sizes.size(); // dp[i][j] : i번쨰 행렬부터 j번째 행렬까지 곱할 때 드는 최소 연산 횟수 vector> dp(n, vector(n, 0)); for (int len = 1; len ::max(); ..