電泡泡

## Problem H: Matrix Multiplication

Time Limit: 1 Sec   Memory Limit: 128 MB
Submit: 87   Solved: 34
[ Submit][ Status][ Web Board]

## Description

Johnny and John are good friends. Johnny is going to take the entrance exams for postgraduate schools.
Recently, he is reviewing Linear Algebra. Johnny always says that he is very skillful at matrix
multiplication. As we all know that, if we know   matrix a (m rows and n columns) and b (n rows and t
columns), the result matrix c (m rows and t columns) can be calculated by expression
c (i, j) = a(i,k)*b(k,j),1<=k<=n.(1<= i <= m, 1 <= j <= t).
But John wants to make things difficult. He wants Johnny to calculate matrix c using expression
c (i, j) = a(i,k)*b(k,j) (1<= i <= m, 1 <= j <= t, i + k is odd and k +  j is even).
We consider that 2 is odd and even. At the beginning, c (i, j) =0.

## Input

The first line of input is the number T of test case.
The first line of each test case contains three integers, m, n, t, indicates the size of the matrix a and b. We
always assume that the rows of matrix a equals to matrix b's columns.
The next m lines describe the matrix a. Each line contains n integers.
Then n lines followed, each line contains t integers, describe the matrix b.
1<= T <= 10, 1 <= m, n, t <= 100, 0 <= a (i, j) <= 100, 0 <= b (i, j) <= 100.

## Output

For each test case output the matrix c. The numbers are separated by spaces. There is no space at the end of
each line.

## Sample Input

1 2 2 2 1 2 2 3 2 3 3 0

## Sample Output

2 0 4 0

### 電泡泡

Computer Graphics Basics - Ⅰ 1. Vector Vector has length and direction Representation Usually drawn as segment with arrow-head Vector Operations Scalar Multiplicaiton Negative......

03/06
0
0
R语言－强大的矩阵运算

1 矩阵基本操作 1.1创建向量 R里面有多种方法来创建向量（Vector），最简单的是用函数c()。例如： >X=c(1,2,3,4) >X [1] 1 2 3 4 当然，还有别的方法。例如： >X=1:4 >X [1] 1 2 3 4 还有seq...

openthings
2015/12/16
170
0
caffe学习:卷积计算

Hanging_Gardens
2018/01/11
0
0
Kalman 滤波器 推导及调参

reasonW
2017/12/03
0
0
Gauss Elimination算法分析与实现

SVD
2015/11/03
0
0

Gemini-Lin
20分钟前
0
0
mybatis缓存的装饰器模式

15
0

imbiao

4
0

sharelocked

5
0
burpsuite无法抓取https数据包

1.将浏览器和burpsuite的代理都设置好 2.在浏览器地址栏输入： http://burp 3.下载下面的证书，并将证书导入浏览器 cacert.der

Frost729

3
0