mixtures wrong answer...HELP Plss

//top down approach to mixtures

#include
using namespace std;

int mixture[101];
int m[101][101];

//function to return modulus upto b starting from a
int mix(int a,int b)
{
int sum=0;
for(int i=a;i<=b;++i)
{
sum=sum+mixture[i];
}
return (sum % 100);
}

//function to get minimum smoke

int getminsmoke(int i,int j)
{ int k,q;
if(m[i][j]!=-1)
return m[i][j];
if(i==j)
m[i][j]=0;
else
{
for(k=i;k<j;++k)
{
q=getminsmoke(i,k)+getminsmoke(k+1,j)+mix(i,k)*mix(k+1,j);
if(q<m[i][j] or m[i][j]==-1)
{
m[i][j]=q;
}
}
}
return m[i][j];
}

//main function
int main()
{

int n;
cin>>n;
for(int i=1;i<=n;++i)
{
	cin>>mixture[i];
}
    for(int i=1;i<=n;++i)
{
	for(int j=1;j<=n;++j)
	{
		m[i][j]=-1;
	}
}
cout<<getminsmoke(1,n)<<"\n";

return 0;

}

//