i am not able to understand optimized solution
and when we use this formulae i will not getting correct answer.
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
sum+=a[i][j]((i+1)(j+1)(n-i)(n-j));
cout<<sum<<endl;
}
i am not able to understand optimized solution
and when we use this formulae i will not getting correct answer.
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
sum+=a[i][j]((i+1)(j+1)(n-i)(n-j));
cout<<sum<<endl;
}