13027 - Matrix Multiplication   

Description

If A is an m × n matrix and B is an n × p matrix,

the matrix product C = AB (denoted without multiplication signs or dots) is defined to be the m × p matrix

 

such that

Compute C = A × B, where AB and C are matrices of size n × mm × p, and n × p, respectivily.

 

Implement the matrix multiplication function matrix_mult(). The code is attached to the problem below.

 

All you need to submit are

 

void matrix_mult(int *const *const matrixA, int rows_A, int cols_A, int *const *const matrixB, int rows_B, int cols_B, int *const *const matrixC)

{   

/* TODO: Your Code here */

}

Reference code (13027.c) for this question is at the very bottom of this page under Partial Judge Code heading.

Input

n, m, where n is row and m is column.

Followed by matrix A elements.

 

m, p, where m is row and p is column.

Followed by matrix B elements.

Output

Matrix C elements.

Sample Input  Download

Sample Output  Download

Partial Judge Code

13027.c

Partial Judge Header

13027.h

Tags




Discuss