Search found 1 match

by fsarker
Mon May 23, 2005 6:12 pm
Forum: Volume 3 (300-399)
Topic: 348 - Optimal Array Multiplication Sequence
Replies: 22
Views: 4026

348: Why am i getting wrong answer?

The following is the code for Optimal Matrix Multiplication #include<iostream> #define MAX 12 using namespace std; int s[MAX][MAX]; void print(int i,int j) { if(i==j) cout<<"A"<<i; else { cout<<"("; print(i,s[i][j]); cout<<" x "; print(s[i][j]+1,j); cout<<")"; } } int main() { int N,i,j,p[11],t,l,k,...

Go to advanced search