#include #include #include /*recursive method*/ int rec_min(int *dim, int n, int r, int s){ if(r == s) return 0; int min, t, c_t; min = rec_min(dim,n,r+1,s)+dim[r]*dim[r+1]*dim[r+1]*dim[s+1]; for(t=r+1; t