Products of matrices P88905


Statement
 

pdf   zip   main.cc

html

Using the declaration

typedef vector< vector<int> > Matrix;

write a function

Matrix product(const Matrix& a, const Matrix& b);

that, given two matrices a and b, computes their product.

Precondition

a is a matrix p× q and b is a matrix q× r, with p,q,r≥1.

Information
Author
Jordi Petit
Language
English
Translator
Carlos Molina
Original language
Catalan
Other languages
Catalan
Official solutions
C++
User solutions
C++