#include using namespace std; int MatrixChainMultiplication(int p[], int i, int j) { if (i == j) return 0; int k; int mini = INT_MAX; int count; for (k = i; k < j; k++) { count = MatrixChainMultiplication(p, i, k) + MatrixChainMultiplication(p, k + 1, j) + p[i - 1] * p[k] * p[j]; mini = min(count, mini); } return mini; } int main() { int n; cout<<"N= "; cin>> n; int arr[n]; cout<<"dimension[]= "; for (int i = 0; i < n; i++) { cin>>arr[i]; } cout << "Output: "<