Matrix Multiplication


Submit solution

Points: 10 (partial)
Time limit: 2.0s
Memory limit: 12M

Authors:
Problem type
Allowed languages
C

Task

To multiply two matrices.

Input

Read the size of first matrix followed by the elements in one line separated by space. Then read the size of second matrix in the next line followed by elements separated by space.

Output

Check the possibility of matrix multiplication and display the result in a new line in matrix format.

Sample Input1

2 2 1 1 1 1

3 3 1 1 1 1 1 1 1 1 1

Sample output1

Matrix multiplication is not possible

Sample Input2

2 2 1 1 1 1

2 3 1 1 1 1 1 1

Sample output2

2 2 2

2 2 2


Comments

There are no comments at the moment.