Just a runnable solution
Code\n\nimpl Solution {\n    pub fn min_score_triangulation(values: Vec<i32>) -> i32 {\n        let n = values.len();\n        let mut dp = vec![vec![0; n]; n];
# Code\n```\nimpl Solution {\n    pub fn min_score_triangulation(values: Vec<i32>) -> i32 {\n        let n = values.len();\n        let mut dp = vec![vec![0; n]; n];\n        for j in 2..n {\n            for i in (0..j - 1).rev() {\n                dp[i][j] = i32::MAX;\n                for k in i + 1..j {\n                    dp[i][j] = dp[i][j].min(dp[i][k] + dp[k][j] + values[i] * values[j] * values[k]);\n                }\n            }\n        }\n        dp[0][n - 1]\n    }\n}\n```
['Rust']