【例62.1】 矩阵加法
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
Given two matrices and of size , output their sum .
Input Format
First line contains two integers and , representing the number of rows and columns of the matrices. , .
Next lines, each containing integers, represent the elements of matrix .
Next lines, each containing integers, represent the elements of matrix .
Adjacent integers are separated by a single space, and each element is between and .
Output Format
Output lines, each containing integers, representing the result of matrix addition. Adjacent integers are separated by a single space.
Sample
3 3
1 2 3
1 2 3
1 2 3
1 2 3
4 5 6
7 8 92 4 6
5 7 9
8 10 12
20251108C班作业(6)
- Status
- Done
- Problem
- 4
- Open Since
- 2025-11-8 0:00
- Deadline
- 2025-11-16 23:59
- Extension
- 24 hour(s)