Problem 2730 --Structured Program II - Matrix Multiplication

2730: Structured Program II - Matrix Multiplication

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $18$ 正确数量 $14$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL 数学

Matrix Multiplication 

Write a program which reads a n×m matrix A and a m×l matrix B, and prints their product, a n×l matrix C. An element of matrix C is obtained by the following formula: 

Cij = Ai1*B1j+Ai2*B2j+Ai3*B3j+...+Aim*Bmj

where aij, bij and cij are elements of A, B and C respectively.

In the first line, three integers n, m and l are given separated by space characters 

In the following lines, the n×m matrix A and the m×l matrix B are given.

Print elements of the n×l matrix C (cij). Print a single space character between adjacent elements.
3 2 3
1 2
0 3
4 5
1 2 1
0 3 2
1 8 5
0 9 6
4 23 14

1≤n,m,l≤100

0≤aij,bij≤10000

推荐代码 查看2730 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] 请问一下安科怎么走 449498 2019-07-27 14:02:16
内存最少[$2020 $KB] 请问一下安科怎么走 449498 2019-07-27 14:02:16
第一AC 却又像风捉摸不住 329426 2018-11-25 14:16:34
第一挑战 刘成健 317898 2018-11-18 21:03:55

赛题来源/所属竞赛 会津大学《C++ Programming I》 C++程序设计(入门)

竞赛编号 竞赛名称 竞赛时间 访问比赛