https://contest.yandex.ru/contest/71291/problems/F/
Time limit: 1 second
Memory limit: 64 MB
Input: standard input or input.txt
Output: standard output or output.txt
Arman, the Gravitational Architect, and Roony, the Spatial Stabilization Technician, need to compute the product of two matrices representing gravitational parameters on the FAIO space station.
Given two matrices:
- The first matrix has size
a × b. - The second matrix has size
b × c.
Compute their product (first multiplied by second) and output the resulting a × c matrix.
Input
- Three natural numbers
a,b,c— the matrix dimensions. - Then follow
alines, each containingbreal numbers — the first matrix. - Then follow
blines, each containingcreal numbers — the second matrix.
Constraints
- (1 \le a, b, c \le 300).
- Matrix multiplication is valid since the first has
bcolumns and the second hasbrows. - All matrix entries are real numbers.
Output
Print the product matrix as a lines, each containing c real numbers separated by spaces.